How to switch to numeric with special characters k

2019-06-02 04:32发布

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?

3条回答
叛逆
2楼-- · 2019-06-02 05:07

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.

查看更多
ら.Afraid
3楼-- · 2019-06-02 05:13

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?

查看更多
冷血范
4楼-- · 2019-06-02 05:24

try to use this in java:

editText.setInputType(InputType.TYPE_CLASS_TEXT);              
editText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
查看更多
登录 后发表回答