Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 672
CurlyPaul Avatar asked Mar 21 '14 15:03

CurlyPaul


People also ask

What is alphanumeric keys in keyboard?

Typing (alphanumeric) keys. These keys include the same letter, number, punctuation, and symbol keys found on a traditional typewriter.

Where is alphanumeric key keyboard?

In computing alphanumeric keys are simply keys on your keyboard that consist of all letters and numbers and some different symbols. These keys include all letters starting from A leading to Z and numbers from 0 to 9.

How do I get my Android keyboard to only show numbers?

Using phone inputType EditText has an attribute called android:inputType . Providing android:inputType with value phone can display numbered keyboard when the EditText gets focus. Create an Android Project and replace layout (activity_main. xml) and Kotlin file (MainActivity.

Which key must be pressed to activate the alphanumeric keypad?

Num Lock - When the Num Lock key is pressed, the numbers on the number pad of the keyboard are activated.


2 Answers

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

like image 179
I.G. Pascual Avatar answered Sep 19 '22 13:09

I.G. Pascual


I think, the only way to achieve what you want it's to create a Custom SoftKeyboard with a custom KeyboardView class.
Here is a tutorial: Custom keyboard and see this SO question: Android app specific soft keyboard especially this answer which links to a open source project.

like image 29
Blo Avatar answered Sep 20 '22 13:09

Blo