-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Fix Numeric Entry not accepting the appropriate Decimal Separator #27376
base: main
Are you sure you want to change the base?
[Android] Fix Numeric Entry not accepting the appropriate Decimal Separator #27376
Conversation
…sLayout is set for Tablet but not on mobile devices (dotnet#26152)" This reverts commit 0ddc794.
…msLayout is set for Tablet but not on mobile devices (dotnet#26152)" This reverts commit 4b9074c.
Hey there @devanathan-vaithiyanathan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Core/src/Platform/Android/LocalizedDigitsKeyListener.cs:26
- The new behavior introduced in GetDecimalSeparator should be covered by tests to ensure it handles different culture settings correctly.
string symbol = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;
Root Cause
The previous behavior does not consider the application's current culture settings, causing the decimal separator to default.
Description of Change
Updated the GetDecimalSeparator method to retrieve the DecimalSeparator from the current culture using CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, ensuring accurate and culture-specific formatting.
Regarding test case
I couldn't find a way to enter a comma using the numeric keyboard, so I didn't add the test case.
Issues Fixed
Fixes #17152
Tested the behavior in the following platforms.
Output Screenshot
Before_fix.mov
After_fix.mov