I live in sweden and my phone/app uses Swedish locale (Sv_SE).
What I want is an Entry field for decimal values.
I create an Entry field and set the Keybord to "Numeric". ( <Entry Keyboard="Numeric"/> )
This gives me a numeric keypad with BOTH "," and "." visible. However, pressing "," has no effect. Only the "." is accepted.
I also tried creating a custom renderer, like suggested here:
to set InputType = InputTypes.ClassNumber | InputTypes.NumberFlagSigned | InputTypes.NumberFlagDecimal
However, still only "." was accepted.
The device is a Google/LG Nexus 5 (phone) using Google Keyboard as it's keyboard.
Since my users here in sweden are used to write one and a half like "1,5" they will end up Writing "15" since the "," is ignored. This is NOT OK!
Please don't suggest to use
KeyListener = DigitsKeyListener.GetInstance("-0123456789,")
since this will force _me_ to check for valid decimal values (the user might otherwice write things like "3,5,4,3,,,9")
Created attachment 16444 [details]
I think the issue is more general: the ‘,’ and ‘-‘ characters on the numeric keyboard are not inputted regardless of the system language. I’ve attached a repro project that demonstrates this.
### Steps to Reproduce
1. Run the Android project
2. Attempt to enter a comma in the Entry
A workaround is to use a custom Entry renderer and use:
> KeyListener = DigitsKeyListener.GetInstance("-0123456789,")
If the Entry is bound to a double, the value entered should be parsed automatically to prevent multiple ‘,’ characters. However there is another bug affecting this (bug#42084). But there is a workaround for that issue as well provided in the report.
Andreas, I talked about the way to validate the text. I don't believe the keyboard should be responsible for data validation. To you, 3,5,4,3,,,9 might be incorrect behavior, but there are many ways to represent numbers internationally and custom logic can be required to generate custom patterns.
Should be fixed in 2.3.5-pre1