On Edit text focus the default keyboard should be displayed with the option to switch to numeric keyboard disabled.
I am aware of the options Viz
2.1 Add ontextchanged listener.
2.2 Add alphabets allowed in digists property in xml e.g adroid:digits="abcdefghijklmnopqrstuvwxyz"
3 The problem with above methods is that the numpad is still shown and the behavior could be better and user friendly if the numpad is not shown at all. Is this possible? If yes how?
Asked
Active
Viewed 5,089 times
2

chaitanyad
- 998
- 1
- 9
- 27
-
show me your layout xml – J.K Aug 21 '14 at 08:59
-
in xml set the edit text attribute android:inputType="text" – Nithinlal Aug 21 '14 at 09:00
1 Answers
0
Set the inputType of your edittext in the XML as "text". This will show only the alphabets keyboard. https://developer.android.com/training/keyboard-input/style.html

Arun Shankar
- 2,295
- 16
- 20
-
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" add this lline and you can block digits pressing – Edhar Khimich Apr 03 '19 at 15:45