Skip to content

[Android, iOS, MacOS] Fixed Entry ClearButton Color Not Updating on AppThemeBinding Change #30817

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

NanthiniMahalingam
Copy link
Contributor

@NanthiniMahalingam NanthiniMahalingam commented Jul 24, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

  • Entry ClearButton Color Not Updating on AppThemeBinding Change on Android, iOS and macOS platform

Root cause

  • On Android, the Entry clear button icon color does not update because the icon is not refreshed when the text color changes.
  • On iOS, the clear button color is not updated when the theme changes due to a missing call to the method responsible for updating the icon color.

Description of Change

  • On Android, I implemented an internal static method UpdateClearButtonColor in EditTextExtensions to update the clear button icon color. This method is invoked via the text color mapper in the Entry handler to ensure the clear button icon reflects theme and text color changes.
  • On iOS and macOS, I updated the text color mapper in the Entry handler to invoke UpdateClearButtonIconColor on the platform view. This ensures the clear button icon color is properly updated when the theme or text color changes.

Validated the behaviour in the following platforms

  • Android
  • Windows ,
  • iOS,
  • MacOS

Issues Fixed

Fixes #19997

Output images

Android

Before After
Before_Android.mov
After_Android.mov

iOS

Before After
Before_iOS.mov
After_iOS.mov

macOS

Before After
Before_macOS.mov
After_macOS.mov

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

Hey there @@NanthiniMahalingam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jul 24, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

if (handler is EntryHandler platformHandler && platformHandler._clearButtonVisible)
{
// Update the clear button color to match the text color
handler.PlatformView?.UpdateClearButtonColor(entry.TextColor, platformHandler.GetClearButtonDrawable());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not changes in Windows, there behavior is currently aligned with this changes? should we apply changes on Windows too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not changes in Windows, there behavior is currently aligned with this changes? should we apply changes on Windows too?

Hi @jsuarezruiz ,
On Windows platform, the clear button icon color updates correctly when the theme changes, as handled in the TextBoxExtensions.cs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android platform/ios platform/macos macOS / Mac Catalyst
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Facing issues with the Entry, DatePicker, and CheckBox components when applying themes.
2 participants