How to Apply the Textchange event on EditText

前端 未结 7 1357
感动是毒
感动是毒 2020-12-13 13:38

I developed one simple app, like subtraction, addition. In this app I use three EditTexts, one for answer and other two for question. I want to calculate the answer of quest

7条回答
  •  猫巷女王i
    2020-12-13 14:15

    I used this and it's correct:

    public void afterTextChanged(Editable arg0) {
        String inputs = input.getText().toString();
        Integer index=0;
        if(!inputs.equals("")) 
            index=Integer.valueOf(inputs);
    
    }
    

提交回复
热议问题