question

njsokalski avatar image
0 Votes"
njsokalski asked

Numeric Keyboard on Surface Duo

I have several EditText elements for which I want the user to only input integers. On the emulator (I admit I have only used one emulator, but I don't think that is the problem here), it displays a numeric keyboard (almost) as I want, but the Surface Duo (emulator & physical device) displays a keyboard with a number of extra characters. Here are screenshots of both:

Emulator:
82185-screenshot-1616977729.png

Surface Duo:
82128-screenshot-1616977547.png

Here are the relevant EditText properties I have set (in the style in styles.xml):

 <item name="android:inputType">number|numberSigned</item>
 <item name="android:numeric">integer|signed</item>
 <item name="android:imeOptions">actionDone|flagNoExtractUi</item>

Even though most of the keys do not do anything (it only lets the user type integers, which is what I want), the buttons for switching between & displaying the other keyboards (such as letters) makes it very ugly & unintuitive. Even though I would like to remove the space, comma & decimal from the keyboard used by the emulator, that is still intuitive for the user. Is there a way to make the Surface Duo display a keyboard that has only numeric keys? Thanks.



dotnet-android
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers