当添加将文本解析为整数的行时,应用程序停止,并且没有此行它运行良好
final TextView secNumber= (TextView)findViewById(R.id.secNumber);
final EditText mainNumber=(EditText)findViewById(R.id.mainNumber);
mainNumber.addTextChangedListener(new TextWatcher(){
public void afterTextChanged(Editable S){
secNumber.setText(Integer.parseInt(S.toString())*100);
}
public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,
int arg3) {
// TODO Auto-generated method stub
}
public void onTextChanged(CharSequence s, int start, int before,
int count) {
// TODO Auto-generated method stub
}
});