Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Xamarin Forms Entry does not allow comma in Numeric Keyboard

$
0
0

Hi. Xamarin Forms version is 2.3.5.255-pre5. No matter Entry is bound to decimal or string property, Numeric keyboard allows only dot input. Tried with English and German language on phone. Even tried forcing German locale in app.
Then, in native Xamarin Android, tried this approach:
Used EditText with following attributes:

Then EditText opened numeric keyboard, and both dot and comma inputs were allowed and shown both in keyboard and EditText.
Then, in Forms, made custom Entry renderer with:
Control.InputType = InputTypes.NumberFlagDecimal;
Control.KeyListener = DigitsKeyListener.GetInstance("1234567890.,");
(Entry bound to string property, trying to simualete edittext setting explained above).
Comma is accepted in this way:
When it is typed, keyboard does not show it
e.g. 23,3, keyboard shows 233
After keyboard is closed, entry has 23,3 inside.
Any proposal? Comma should be shown also while typing in numeric keyboard.


Viewing all articles
Browse latest Browse all 91519

Trending Articles