mikepenz / MaterialDrawer

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
https://mikepenz.dev
Apache License 2.0
11.67k stars 2.05k forks source link

Drawer is shown under status bar #2722

Closed m-makhovyk closed 3 years ago

m-makhovyk commented 3 years ago

Thanks for making this libary. Is it possible to show drawer over status bar?

Details

Checklist

mikepenz commented 3 years ago

@m-makhovyk looks like your theme does not specify it to go behind the statusbar

m-makhovyk commented 3 years ago

@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 3 years ago

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 3 years ago

Thanks a lot!