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 ToolbarItem font color issue after changing available state. #24065

Merged
merged 8 commits into from
Aug 22, 2024

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

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

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
Copy link
Member

PureWeen commented Aug 7, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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

Adding Tests in progress

@PureWeen PureWeen self-assigned this Aug 7, 2024
@PureWeen
Copy link
Member

PureWeen commented Aug 7, 2024

Tested referenced issues and this looks good

Once we get a test let's merge it

@PureWeen
Copy link
Member

PureWeen commented Aug 8, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Aug 9, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Tamilarasan-Paranthaman
Copy link
Contributor Author

@dotnet-policy-service agree

@PureWeen PureWeen merged commit 7818450 into dotnet:main Aug 22, 2024
97 checks passed
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
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
6 participants