【发布时间】:2014-07-05 05:04:59
【问题描述】:
Edittext(AmountPaid) and Button(Print).
当我点击打印时,amountpaid 将显示另一个 Edittext(TotalAmount)。 每次计算并显示金额。 请指导我实现目标的正确方法。
total=(EditText)findViewById(R.id.editText20);
amountpaid=(EditText)findViewById(R.id.editText8);
Print.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
String amntpaid=PaymentPaid.getText().toString();
total.requestfocus();
}
});
【问题讨论】:
-
光标转到totalamount。但插入的amountpaid值不会达到total(Edittext)。
-
你的 logcat 显示的是什么?发布 logcat 错误(如果有)。
-
@GrIsHu logcat 没有显示任何错误。我正在使用 total.requestfocus();甚至光标总达到(edittext)但插入量如何显示??
标签: android xml button android-edittext