Drawer is shown under status bar
m-makhovyk opened this issue · 4 comments
m-makhovyk commented
Thanks for making this libary. Is it possible to show drawer over status bar?
- I'm using single activity approach so drawer is located inside fragment. DrawerLayout is exactly like in your ReadMe.
Screenshot:
https://imgur.com/a/44fPZQR
Link from FAQ returns 404:
https://github.com/mikepenz/MaterialDrawer/blob/develop/FAQ/status_bar_whitespace.md
Details
- [8.3.1 ] Used library version
- [ 4.1.1] Used gradle build tools version
- [ 4.1.2] Used Android Studio version
Checklist
- [Yes ] Searched for similar issues, but they all use old library versions
- [ Yes] Checked out the sample application
- [ Yes] Read the README
- [ Yes] Checked out the CHANGELOG
- [ Yes] Read the FAQ (404 on needed link)
- [ No] Checked out the MIGRATION GUIDE
mikepenz commented
@m-makhovyk looks like your theme does not specify it to go behind the statusbar
m-makhovyk commented
@mikepenz here is my style for drawer:
<style name="MaterialDrawer" parent="Widget.MaterialDrawerStyle">
<item name="materialDrawerInsetForeground">#4000</item>
<!-- MaterialDrawer specific values -->
<item name="materialDrawerBackground">?colorSurface</item>
<item name="materialDrawerPrimaryText">?android:textColorPrimary</item>
<item name="materialDrawerPrimaryIcon">?android:textColorSecondary</item>
<item name="materialDrawerSecondaryText">?android:textColorSecondary</item>
<item name="materialDrawerSecondaryIcon">?android:textColorSecondary</item>
<item name="materialDrawerDividerColor">?android:textColorHint</item>
<item name="materialDrawerSelectedBackgroundColor">?colorPrimary</item>
</style>
And my theme:
<style name="Theme.Dots" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary</item>
<item name="colorAccent">@color/orange</item>
<item name="materialDrawerStyle">@style/MaterialDrawer</item>
</style>
Could you point out what might be wrong, please?
mikepenz commented
The DrawerLayout
only reaches behind the statusBar if this is set: https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/res/values/themes.xml#L14
This is unrelated to the library though, as the DrawerLayout
is provided by google :). This project only provides the contents of the drawer.
m-makhovyk commented
Thanks a lot!