0

I am working on an application in which had design one keypad mobile in which added one text and 12 buttons 1,2,3..so on. want to add text like on pressing 2 getting 2, A, B, C so should enter like a text message. stuck on this could anyone please help me out? thank you if anyone helps.

Keypad mobile design

I had declared one int counter = 0; above and on the button, I am using the below code.

`
String[] input = {"2","A", "B", "C"};
            if(counter < input.length){
                value = value+(input[counter]);
                //value=value+""+d;
                String e =""+editText.getText().toString();
                editText.setText(value);
                counter++;
            }else {
                counter = 0;
            }

`

SurajSingh
  • 11
  • 3

0 Answers0