[First - PlatformSpecific] NavigationBar for Android #1678
Conversation
pictos
left a comment
There was a problem hiding this comment.
A couple of comments that could be helpful for anyone who wants to implement some Platform-Specific in the future.
|
|
||
| internal static partial void RemapForControls() | ||
| { | ||
| PageHandler.Mapper.Add(ColorProperty.PropertyName, MapNavigationColorProperty); |
There was a problem hiding this comment.
Think this as the PropertyChanged for the BindableProperty, and this will be attached to the Page, but keep in mind that should be attached to the control that we'll implement the feature
|
|
||
| namespace CommunityToolkit.Maui.PlatformConfiguration.AndroidSpecific; | ||
|
|
||
| static partial class NavigationBar |
There was a problem hiding this comment.
As you will see I created this as partial class, one to hold the properties that should be visible for all platforms, and the implementation, which can be visible just for the platform-specific, in this case android.
| /// <summary> | ||
| /// Provides platform-specific configuration properties for the Android navigation bar. | ||
| /// </summary> | ||
| public static partial class NavigationBar |
There was a problem hiding this comment.
This is the property class, where we hold everything that should be visible for all platforms
| internal static partial void RemapForControls(); | ||
|
|
||
| #if !ANDROID | ||
| internal static partial void RemapForControls() | ||
| { | ||
|
|
||
| } | ||
| #endif |
There was a problem hiding this comment.
use this pattern here, so when we call this method on AppBuilderExtensions we don't need to use the #if <Platform>, so we do the mess just in one place.
Co-authored-by: Vladislav Antonyuk <[email protected]>
|
Thank you for another great piece of work @pictos! |
|
Oops guess we still needed the documentation of course |
I'll jump on that tonight |
|
Thank you! Let me know if you can do it, else I will! |
|
@jfversluis you should find a docs PR waiting for your review :) |
Description of Change
This PR implements our first platform-specific feature. It's a move on from the approach taken on #1665.
Documentation will be created after the PR review.
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRAdditional information
Screenbits.2024-02-05_013419.mp4