[Android, iOS, MacOS] Fixed Entry ClearButton Color Not Updating on AppThemeBinding Change#30817
Merged
jfversluis merged 15 commits intodotnet:inflight/currentfrom Sep 1, 2025
Merged
Conversation
Contributor
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jsuarezruiz
reviewed
Jul 25, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the Entry control's clear button color does not update when the app theme changes on Android, iOS, and macOS platforms. The issue occurred because the clear button icon color was not being refreshed when the text color changed due to AppThemeBinding updates.
Key changes implemented:
- Added a new method to update clear button color on Android when text color changes
- Modified Entry handlers on iOS and macOS to call the clear button color update method when text color changes
- Refactored Android clear button color logic to use the new extension method
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Core/src/Platform/Android/EditTextExtensions.cs |
Added new UpdateClearButtonColor method to handle clear button icon color updates |
src/Core/src/Handlers/Entry/EntryHandler.iOS.cs |
Modified MapTextColor to call clear button color update when clear button is visible |
src/Core/src/Handlers/Entry/EntryHandler.Android.cs |
Updated MapTextColor and ShowClearButton to use the new color update method |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19997.cs |
Added UI test to verify clear button color updates on theme change |
src/Controls/tests/TestCases.HostApp/Issues/Issue19997.cs |
Created test page with Entry using AppThemeBinding and theme toggle button |
Comments suppressed due to low confidence (1)
src/Core/src/Handlers/Entry/EntryHandler.Android.cs:86
- [nitpick] The variable name 'platformHandler' is misleading since 'handler' is already the platform handler. Consider renaming to 'entryHandler' or 'concreteHandler' for clarity.
if (handler is EntryHandler platformHandler && platformHandler._clearButtonVisible)
Contributor
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
MartyIX
reviewed
Jul 30, 2025
MartyIX
reviewed
Jul 30, 2025
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19997.cs
Outdated
Show resolved
Hide resolved
MartyIX
reviewed
Jul 30, 2025
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19997.cs
Outdated
Show resolved
Hide resolved
MartyIX
reviewed
Jul 30, 2025
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19997.cs
Outdated
Show resolved
Hide resolved
5944910 to
588d9ee
Compare
Member
|
/rebase |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2 similar comments
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jfversluis
approved these changes
Sep 1, 2025
040c4ee to
94e158c
Compare
PureWeen
pushed a commit
that referenced
this pull request
Sep 8, 2025
Added the fix for android platform Remove unwanted code changes Updated the code changes Updated the code changes Updated the fix Updated the code changes Added the test case Added the output images Updated the test case Updated the fix Added the pending snapshots Updated the test case Added the updated output images for mac and windows platform Added the output images for entry feature matrix test case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Root cause
Description of Change
Validated the behaviour in the following platforms
Issues Fixed
Fixes #19997
Fixes #31326
Output images
Android
Before_Android.mov
After_Android.mov
iOS
Before_iOS.mov
After_iOS.mov
macOS
Before_macOS.mov
After_macOS.mov