I\'ve been playing with Google\'s new design support library and it\'s a blast! I\'m just a little stumped though on the navigation view. All the things I read say that the
set this to your navigationView
android:fitsSystemWindows="true"
this will ensure that the navigation will be behind the statusbar
and add colorAccent
to your style in values folder.
In your style file try to use AppCompact theme as parent ...
<style name="AppTheme" parent="Base.Theme.AppCompat">
I hope it helps you..
set this to your navigationView android:fitsSystemWindows="false"
After struggling with this for several more hours, and copiously comparing my code to the cheesesquare app, I found the following: The DrawerLayout
must have the attribute android:fitsSystemWindows="true"
, and the NavigationView
as well, but the CoordinatorLayout
should not. Once I made those changes, it worked.
Thanks all, and hopefully this is helpful to somebody!
You can look at my code for the layout here.
-Justin
You should check newer SDK examples.
actually they are using Coordinatorlayout
in activity
that you want to draw under statusbar
and have different theme for that layout, because if you put transparent statusbar
for other activities where you don't have root layout Coordinatorlayout
it will show white uncolored statusbar
.