Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inputType="numberDecimal" doesn't accept comma, even when using android:digits="0123456789.,"

I have an EditText like this.

<EditText
    ...
    android:inputType="numberDecimal"
    android:digits="0123456789.," />

On most devices it works fine, all the characters specified in android:digits are accepted. But on Samsung GT-P5100 (Galaxy Tab 2 10.1) the comma is disabled:

enter image description here

Any ideas?

like image 386
Michał Klimczak Avatar asked Sep 06 '25 03:09

Michał Klimczak


1 Answers

Use android:inputType="phone". :)

like image 196
UrMi Avatar answered Sep 07 '25 20:09

UrMi