Mando
Mando

Reputation: 11712

How to switch to numeric with special characters keyboard of EditText in Android by default

I want to show this keyboard by default on EditText focus:

enter image description here

These actions didn't help:

inputType=number
inputTYpe=phone
numeric=integer
setRawInputType(...) 

How should I do it?

Upvotes: 1

Views: 3922

Answers (3)

suitianshi
suitianshi

Reputation: 3340

There's no way to achieve this. Even if your input method includes such a key panel, it's up to the keyboard "author". More importantly, the "even if" is even not guaranteed.

Upvotes: 1

Wishmaster
Wishmaster

Reputation: 870

That old problem still not solved. There's no way to show numeric keyboard with option of switching back.

This question discussed here Is there a way to show the numbers first on the soft keyboard for Android?

Upvotes: 1

johnrao07
johnrao07

Reputation: 6908

try to use this in java:

editText.setInputType(InputType.TYPE_CLASS_TEXT);              
editText.setRawInputType(InputType.TYPE_CLASS_NUMBER);

Upvotes: 1

Related Questions