Vinicius Biscolla
Vinicius Biscolla

Reputation: 49

dots and commas are not appearing in android numbers keyboard

i implemented the keyboard number with , and . available for typing, in android EditText.

But when i install my application, in just some devices, the dots and commas are not prompting in the EditText after pressed, anyone have any ideas about that ??

And if is possible to be some keyboard configuration in the specific device ? any helps ? here is my code example...

<EditText
            android:id="@+id/notaosadd_quantidadenecessaria"
            android:layout_width="fill_parent"
            android:layout_height="match_parent"
            android:maxLength="10"
            android:digits="0123456789,."
            android:hint=""
            android:inputType="number" />

Upvotes: 0

Views: 2661

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006944

But when i install my application, in just some devices, the dots and commas are not prompting in the EditText after pressed, anyone have any ideas about that ?

android:inputType="number" is just a suggestion, just as android:digits is just a suggestion. The input method editor can do whatever it wants. Ideally, the input method editor takes everything you request into account. But there are dozens, if not hundreds, of available input method editors, and none are required to honor your requests. Users can use whatever input method editors that they want, and so your app cannot assume that your inputType and digits will be honored.

And if is possible to be some keyboard configuration in the specific device ?

You are welcome to examine fields on the Build class, like PRODUCT, and attempt to reconfigure your EditText. However, that would not be very effective. Users can use whatever input method editors that they want, including many that are available from distribution channels like the Play Store.

Upvotes: 1

Related Questions