我有一个小的小技巧计算器应用程序,工作得很好,我试图实现一个清晰的按钮,但与代码我试过它只是关闭应用程序,我将如何去开始这里的代码结束了...就是我下面尝试..重新启动应用程序W/O关闭它
clearButton.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
percentage = 0;
output = 0;
output1 = "";
TextView textView = null;
textView.clearComposingText();
percentageInp = 0;
billAmount = 0;
myEditField.setText("");
myEditField2.setText("");
return;
}
});
这解决了一个问题,所以如何将我重新开始呢? – PrommeringsDisplay 2012-08-02 02:12:51
或清除所有变量; – PrommeringsDisplay 2012-08-02 02:13:08
是的,它的工作,exept如果其中一个文本字段为空 – PrommeringsDisplay 2012-08-02 02:25:38