-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] AppCompat NavigationBar should handle Transluscent Flags #1287
Conversation
if the app uses any TransluscentFlags padding will be added to the Toolbar. When device is rotated a new height is calculated. This leads to the Toolbar being reset by ResetToolbar(). If the old toolbar was adjusted by toppadding the new toolbar should get the same padding to not be layout out under the statusbar
While debugging the code i see that ResetToolbar is called twice on device orientation. One from propertychanged and one from OnLayout(). OnLayout will call resetToolbar() since ActionBarHeight() returns a different height now that it is in a different orientation => triggering ResetToolbar(). As your comments say in code the call from PropertyChanged should be removed. |
+1 to this .. would like to see this in there soon |
@bentmar can you rebase to run uitest please. Thanks |
I did this PR "manually" by pasting code in the browser. How does one rebase that? |
any word on this when will it be finally pulled? we are in desperate need of this, because we can not refresh our nugets thus it is broken since 2.4 :/ |
Great and really required fix, thanks. In which release should this fix be included? |
Return user's email as part of the properties.
Description of Change
When using either TransluscentStatus or TransluscentNavigation flags on Android the content will be layed out under the statusbar (not below as it would without them). This PR adds padding and height to NavigationBar if any of those flags are set. The padding is calculated based on the statusbar height.
Now we can finally use the flags mentioned on android to create stunning looking UI.
To use any of the flags just set this in MainActivity OnCreate()
Before we added a statusbarunderlay = we couldnt layout stuff under the statusbar even with those flags, but that got removed in 2.3.4 (i think). Now the only thing stopping us is the adjusting padding and height, thats what this PR solves for NavigationBar.
Here are som images:
BEFORE with transluscentNavigation
AFTER with transluscentNavigation
BEFORE with both transluscent statusbar and navigation
After with both transluscent statusbar and navigation
Drawer looks nice on MDP with trascuscentstatusbar!
Drawer looks nice on MDP with trascuscent flags! (this is KitKat)
Kitkat with no transluscentflags
BEFORE Kitkat with both flags transluscentflags
AFTER Kitkat with both flags transluscentflags
PR Checklist