Soft keyboard with comma instead of dot for decimal separator in android
android
Solution
You can use the following workaround to also include comma as a valid input:-
Through XML:
<EditText
android:inputType="number"
android:digits="0123456789.," />
Programmatically:
EditText input = new EditText(THE_CONTEXT);
input.setKeyListener(DigitsKeyListener.getInstance("0123456789.,"));
In this way Android system will show the numbers' keyboard and allow the input of comma. Hope it helps :)
Problem
I have been reading some threads about this problem and some are not answered and others (from 2011) explain how this was a known bug. Has this been solved? Is it possible right now to show soft keyboard with culture information? I would like to show a decimal keyboard showing a "," instead of a "dot" for the decimal separator.