Search code examples
androidandroid-softkeyboard

Show the softkeyboard with only alphanumeric keys?


Is it possible?

I would like to show the keyboard with the bare basic alphabetic and numeric buttons, no settings key or smiley key or anything like that, just the letters, numbers, space, done, and shift etc.

I swear I happened to catch an article about how to set the keyboard in this mode months ago, but I can't find it now!

I looked at the possible values for android:inputType & android:windowSoftInputMode but I can't see anything that would help. What am I missing?

Update

The software is designed to run on a particular tablet, one that the customers purchase with the software and we control what is installed on it. They currently run Cyanogen 4.2.2 with the standard keyboard.


Solution

  • Did you give a try to android:inputType="textVisiblePassword".

    You can also do it programatically, without changing any other aspect of the EditText with:

    editText.setRawInputType(InputType.TYPE_CLASS_TEXT | 
            InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD)
    

    It will show something like this:

    textVisiblePassword soft input andrdoid