[Android] Fix issues setting Shell TabBar appearance. #15734
Merged
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.
Description of Change
Android portion of the following PR
#15447
Priority of how the colors are applied.
The APIs available to us are fairly limiting in scope. Ideally, we would make this all work through the VSM and just use two APIs (IconColor/TitleColor) but for now we are just making these APIs consistent between the platforms.
The three properties users have to influence the
TabItem
coloring are:TabBarUnselectedColor
,TabBarTitleColor
, andTabBarForegroundColor
Shell.TabBarTitleColor
that will color theTitle
andIcon
of the selected item. I realize this is a bit weird for TitleColor to changeIcon
color but this is currently how Android works and it's not really worth breaking this until we just introduce new APIs.Shell.TabBarTitleColor
is not set then theTitleColor
will match theTabBarForegroundColor
TabBarForegroundColor
is set andTabBarUnselectedColor
isn't set thenTabBarForegroundColor
will be the color used for the text/icon of the selected TabItemTabBarUnselectedColor
is the only thing set then that will be used for the text/icon color on the unselected Tab Item.Examples
TabBarTitleColor
: GreenTabBarForegroundColor
: BlueTabBarForegroundColor
: Blue,TabBarTitleColor
: GreenShell.ForegroundColor
: Blue,TabBarTitleColor
: Green (ForegroundColor propagates to TabBarForegroundColor).TabBarForegroundColor
: Blue,TabBarTitleColor
: Green,TabBarUnselectedColor
: PinkPink
Breaking changes
ForegroundColor
set, then thetab
will match according to that color.