In Android, how may I append text to an EditText that was written with setText?

100 Views Asked by At

I have two buttons and an EditText. Button 1 has "ABC" while button 2 has "DEF". I've set up a counter within button1 so that pressing button 1 sets the text to either A, B, or C.

In the runnable I set the selection to the end of the editText after one second. My problem now is that if I then press button 2 the text that was written by button 1 gets replaced. I know I can use append, but without setText I cannot let the user choose what letter from button 1 or 2 should be used.

I'm just creating a simple T9 keypad from the good old days.

0

There are 0 best solutions below