Skip to content

[Android] Fix ToolbarItem font color issue after changing available state.#24065

Merged
PureWeen merged 8 commits into
dotnet:mainfrom
Tamilarasan-Paranthaman:fix-22937
Aug 22, 2024
Merged

[Android] Fix ToolbarItem font color issue after changing available state.#24065
PureWeen merged 8 commits into
dotnet:mainfrom
Tamilarasan-Paranthaman:fix-22937

Conversation

@Tamilarasan-Paranthaman

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman commented Aug 7, 2024

Copy link
Copy Markdown
Member

Root Cause:

  • When updating the toolbar items at runtime, the tintColor was passed as null by default to the UpdateMenuItem method from the OnToolbarItemPropertyChanged method. In UpdateMenuItem, if tintColor is null, the text is set to the title without applying any color. As a result, the text was set without the intended color.

Description of Change:

  • We should pass the BarTextColor to the OnToolbarItemPropertyChanged method instead of null, similar to how we update the value during initial loading in the UpdateMenu method.

Reference:

PlatformView.UpdateMenuItems(ToolbarItems, MauiContext, BarTextColor, OnToolbarItemPropertyChanged, _currentMenuItems, _currentToolbarItems, UpdateMenuItemIcon);

Issues Fixed

Fixes #22937
Fixes #10660

Screenshots:

Before Issue Fix After Issue Fix

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner August 7, 2024 10:50
@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Aug 7, 2024
@PureWeen

PureWeen commented Aug 7, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 8 SR9 milestone Aug 7, 2024
@PaulAndersonS

Copy link
Copy Markdown
Contributor

Adding Tests in progress

@PureWeen PureWeen self-assigned this Aug 7, 2024
@PureWeen

PureWeen commented Aug 7, 2024

Copy link
Copy Markdown
Member

Tested referenced issues and this looks good

Once we get a test let's merge it

@PureWeen

PureWeen commented Aug 8, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue10660.cs Outdated
@PureWeen

PureWeen commented Aug 9, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member Author

@dotnet-policy-service agree

@PureWeen PureWeen merged commit 7818450 into dotnet:main Aug 22, 2024
Redth pushed a commit that referenced this pull request Aug 22, 2024
…state. (#24065)

* [Android] ToolbarItem font color issue.

* Added UI Tests.

* Modified the test case.

* Updated the test cases.

* Commit for test cases change

* Modified the test samples.

* Modified the test samples.

* Images have been added.

---------

Co-authored-by: Suthi <suthi.yuvaraj@syncfusion.com>
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Aug 27, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.1.24453.9 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Sep 20, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 21, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman deleted the fix-22937 branch January 20, 2026 11:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution fixed-in-9.0.0-rc.1.24453.9 partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Android project ToolbarItem font color exception after changing available state [Bug] [Android] Inconsistent toolbar text color on interaction.

6 participants