[align=center][TinyTut] - Recognize numeric key press[/align]
What you learn: You will learn, how to accept numeric key-press.
Difficulty: 1 of 5
I wanted my control to accept numeric key press. The fist idea was to compare keyCode with the KeyEvent.KEYCODE_1, KeyEvent.KEYCODE_2 etc constants, but here was a trap - on my desktop keyboard this solution worked ok, but on virtual android keyboard 1 is drawn over Q, etc and when I did a press with a mouse, the keycode did not match to KeyEvent.KEYCODE_1 (it was KeyEvent.KEYCODE_Q I suppose). The solution to workaround this situation is the following: