Getting the default numeric keypad

How can I change the standard Android keyboard? I want the numeric keypad to be displayed first, and then pressing ABC on the numeric keypad, I want to display the alphabetic keyboard. Can this be implemented? Thanks in advance.

+3
source share
5 answers

Assuming you are using a TextView to enter text, you just need to set the inputMethod property.

http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputMethod

+1
source

As I said in this question , I did not find the answer to this question, except if you wrote your own keyboard

0
source

"" inputype EDITTEXT

0
source

Use InputType = " number " in edittext

0
source

Just set the IME parameter on your numeric keypad and once press the enter button for the input type programmatically as follows:

EditText editText= (EditText) mView.findViewById(R.id.et_awesome);
editText.setOnEditorActionListener(new EditText.OnEditorActionListener() {
@Override
public boolean onEditorAction(EditText v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_GO) {
   editText.setInputType(InputType.TYPE_CLASS_TEXT);
   return true;
}
return false;
} 

});

EditText in XML:

<EditText
    ...
    android:imeOptions="actionGo"
    android:imeActionLabel="ABC"
    android:imeActionId="666"
    android:inputType="number"/>
0
source

Source: https://habr.com/ru/post/1780850/


All Articles