Skip to content
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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

devanathan-vaithiyanathan
Copy link
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Jan 27, 2025

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.

  • Android
  • Windows
  • iOS
  • Mac

Output Screenshot

Before After
Before_fix.mov
After_fix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 27, 2025
Copy link
Contributor

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.

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 27, 2025
@devanathan-vaithiyanathan devanathan-vaithiyanathan marked this pull request as ready for review January 29, 2025 15:40
@Copilot Copilot bot review requested due to automatic review settings January 29, 2025 15:40
@devanathan-vaithiyanathan devanathan-vaithiyanathan requested a review from a team as a code owner January 29, 2025 15:40

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-entry Entry community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numeric Entry uses wrong decimal separator in MAUI app running on Android
3 participants