3

How can I change android's default keyboard? I want numeric keyboard to be shown first and then on clicking ABC in the numeric keyboard, I want to show alphabets keyboard. Is that possible to implement? Thanks in advance.

Anju
  • 9,379
  • 14
  • 55
  • 94

5 Answers5

1

Assuming you're using a TextView for your text input, you simply need to set the inputMethod property.

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

Jason L.
  • 2,464
  • 1
  • 23
  • 41
0

Use InputType="number" in your edittext

Mahesh
  • 2,862
  • 2
  • 31
  • 41
0

Just implement IME option on your numeric keyboard and once clicked change input type programmatically like this:

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 on XML:

<EditText
    ...
    android:imeOptions="actionGo"
    android:imeActionLabel="ABC"
    android:imeActionId="666"
    android:inputType="number"/>
Kunami
  • 237
  • 3
  • 8
0

As I said in this question, I didn't find any answer to that except if you wrote your own keyboard

Community
  • 1
  • 1
Heidar
  • 498
  • 1
  • 17
  • 35
0

You can do that with the word "phone" in inputype property of your EDITTEXT

letroll
  • 1,059
  • 1
  • 14
  • 36