When trying to work with a comma (,
) as the decimal separator and inputType="numberDecimal"
(or "number"
), I have problem in smartphone in landscape mode, the comma is not showing.
My layout:
When I open the keyboard:
My EditText layout.
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789,"
android:inputType="numberDecimal"
android:text="5,2" />
And my default Locale
is pt_BR
, where the comma is the decimal separator.
In "tablets" is ok, because the keyboard is not full-screen.
If I remove android:inputType="numberDecimal"
, also is ok, but does not show the numeric keyboard.
Any suggestions?
EDIT #1
A partial solution I found was to add android:imeOptions="flagNoFullscreen"
.
EDIT #2
The comma is adopted by half the world. Why is it so hard on Android? :(
inputType
settings aren't localized at all, so it's the same set of characters regardless of your locale. Have you tried this with a different keyboard app? The full-screen input mode is owned by the keyboard. – Herat