"Virtual Keyboard" - Java Android

1

Well, I'm in need of a little help. I was thinking about creating a kind of keyboard with just a few buttons for my Android application but I'm not getting what I want.

Iintendedtocreatethiskeyboardandtypethecharactersinthewhitebarabove,whichisanEditTextalreadycreated.TheproblemIamhavingisthatwheneverIpressabutton,itsonlyvalueappearsinthebar,notthesequenceasnormallyhappenswithanykeyboard.Ithinkit'sbecauseofthe"setText" that exists in the method of each button but I do not know any way to solve it. Thanks if you can help me

    
asked by anonymous 18.07.2017 / 21:28

1 answer

1

You can use the append () method. of EditText. It will append what you pass by parameter to what is already present in EditText.

editText.append(")");
editText.append("1");
    
20.07.2017 / 14:19