Search code examples
androidcharcharacterletter

Take only one character from user in Android


I want user to enter just one character. I thought to make buttons for every letter, but this is useless. Could you recommend something to overcome this problem? Thanks in advance..


Solution

  • You could among other solutions make a field and set your event handler to only accept one character at the time.

    This is very close to that question: Validation on Edit Text