1

I have an editText and I want to make the number and symbols pad (the "?123") as the default input type since the user will mostly input numbers, slashes, and the percent sign.

I've look around the questions here, but those mostly show the number pad instead. I've tried the solution to this problem editText.setRawInputType(Configuration.KEYBOARD_QWERTY); but it shows the number pad on android 4.4.4.

Now I'm stuck because the input types in the xml do not seem to show the ?123 pad. I was thinking of doing it programatically instead but that seems to be a dead end as well.

Any ideas anyone?

Community
  • 1
  • 1
Razgriz
  • 7,179
  • 17
  • 78
  • 150

2 Answers2

2

There is no way to do that. All you can do is give it the input type. The keyboard itself will decide what to display based on the EditorInfo (which holds the input type and a few other pieces of information) and it will differ for each keyboard- remember that not all phones will use the default keyboard, and some OEMs (Samsung) have their own they replace the default with). Your only real option is to send a numeric inputType, and hope it displays what you want.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
0

Try InputType instead of Configuration. Check this out.

Prashant Kedia
  • 318
  • 5
  • 14