Search code examples
androidbackground-subtraction

Subtract at runtime in Android


I have three edittext named et1,et2,et3. I want to subract et1 and et2 and show the answer in et3. But this should be done without clicking any button. As soon as I write values in et1 and et2, the calculations have to be done and displayed in et3.

Thank You, Spandan Joshi


Solution

  • You will need to use addTextChangedListener() on edittext.

    Check this link - android on Text Change Listener

    Hope it will help you!