[C, iOS, AND, UWP] TabbedPage SelectedTabColor and UnselectedTabColor #4899
[C, iOS, AND, UWP] TabbedPage SelectedTabColor and UnselectedTabColor #4899
Conversation
Can I do anything about the failing tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost there
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Removed last calls to (now) obsolete members in Android which caused the build to fail, sorry about that 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we accidentally dropped support for the platform specific. What we can do is make the platform specific just set the real property. This way, we have all new and beautiful code, but the old platform specifics still work.
@mattleibow I see your point, I'm just not a big fan of multiple ways to do the same thing, that is why I chose to deprecate the one method. Still, for that time I might be able to change the implementation to set the new property. Else we'll have two properties and two ways of doing the same thing. I'm even less of a fan of that 😉 This would also solve the (accidental) dropping the old way. Does that make sense? Edit: Already made some changes, just awaiting the naming and deprecation then I guess! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better. Just had a thought that if we are setting the new property via the old one, we don't actually need to check the old one anymore.
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Thanks @mattleibow ! Makes sense, I think I got all that you meant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are good.
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs
Outdated
Show resolved
Hide resolved
Co-Authored-By: jfversluis <github@geraldversluis.nl>
Suggestion batch committed 😎 thanks @samhouts ! |
…xamarin#4899) * Implemented Core and iOS * Implemented Android * Supressed platform specific obsolete warnings for now * Implemented UWP * Make selected page on UWP not rely on title * Review feedback * Removed references to (now) obsolete members * Review feedback fixes * Code review feedback * Changed obsolete msg to reflect right XF version * Apply suggestions from code review Co-Authored-By: jfversluis <github@geraldversluis.nl> fixes xamarin#3478
Description of Change
I opened a previous PR (#3519) for this but that was an iOS-specific one, after the idea of #3478.
In that PR, we got the idea to make it available in general rather than via platform-specifics. This is the PR to do that.
There was already an Android platform-specific for this, I have marked that as obsolete in favor of this.
Issues Resolved
API Changes
Added:
Platforms Affected
Behavioral/Visual Changes
The user is now able to specify a separate color for a selected and unselected tab. There shouldn't be any behavioral changes. Android users of the "old"
On<Android>().SetBarItemColor(Color.Red);
andOn<Android>().SetBarSelectedItemColor(Color.White);
will notice that these are now marked as obsolete and are directed to this new method which does the same.Before/After Screenshots
Android
Before:
After:
iOS
Before:
After:
UWP
Before:
After:
Testing Procedure
Added a case to the gallery root page
RootPages Gallery
->Tab->Content
.Original: https://www.dropbox.com/s/4zred5fkizo9y92/SelectedTabColor.mov?dl=0
PR Checklist