DSlomer64
DSlomer64

Reputation: 4283

How can I request a "mini-keypad" for Android device in landscape mode?

(Googling has turned up nothing since I really don't know what the specific object referred to in the first pic is called....)

How can I request in Java, preferably (and/or .xml), to automatically display the soft keypad shown immediately below instead of the "full" keypad shown in the second pic?

enter image description here

I don't want this one (the default?) to show and then hope user knows how to get the one above (although it is semi-obvious how to do so):

enter image description here

Upvotes: 0

Views: 78

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007349

You have two problems.

The first is that few Android devices have what you are describing. In five minutes of testing, I see this option on a SONY Xperia Z2 Tablet, but not on a Samsung Galaxy Tab S, Nexus 9, LG G-Pad 8, or Amazon Fire HD 10. I would be fairly surprised to see it on any phone, and so I'd guess that maybe 1-2% of Android devices happen to ship with an input method editor that happens to offer this feature.

The second is that you have no means of accomplishing your aim, outside of perhaps some keyboard-specific APIs. That implies that you can find out what input method editor the user is using, and that you can contact the makers of such keyboards and ask them if there is some means of getting the mini keyboard to show up.

Android apps can request generic input method editor capabilities through things like android:inputType on EditText. Those are requests, not commands, even for the things that are part of the Android SDK. The mini-keypad option goes beyond the SDK.

Upvotes: 1

Related Questions