SlidingMenu icon indicating copy to clipboard operation
SlidingMenu copied to clipboard

android:windowTranslucentStatus is not working with the Slidingmenu

Open Livinlawrence opened this issue 9 years ago • 6 comments

I have added the following lines in styles.xml @android:color/transparent true

But the toolbar in the layout is still staying below the status bar and the color of the status bar seen gray. I want to show my layout and the sliding menu full screened including the status bar with a transparent color. What change should i make to enable this feature.

Livinlawrence avatar Apr 27 '15 13:04 Livinlawrence

+1. You might try to change the sdk target to v22. and make -v19 v-21 for the old style settings since they dont support android:windowTranslucentStatus only for v21.


<!--v22-->
   <style name="MaterialNavigationDrawerTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="belowToolbar">false</item>
        <item name="drawerActionBarStyle">@null</item>
    </style>


<!--v21 -->
 <dimen name="statusMargin">24dp</dimen>
    <dimen name="userSpace">188dp</dimen>
    <dimen name="photoMarginTop">40dp</dimen>


<style name="MaterialNavigationDrawerTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="belowToolbar">false</item>
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:statusBarColor">@color/transparent</item>
        <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
        <item name="popupTheme">@style/Base.V21.Theme.AppCompat.Light.Dialog</item>
        <item name="actionBarOverlay">false</item>
        <item name="actionBarOverlayAlpha">1.0</item>
        <item name="drawerActionBarStyle">@null</item>
    </style>


<!--v19 -->
    <dimen name="statusMargin">0dp</dimen>
    <dimen name="userSpace">189dp</dimen>
    <dimen name="photoMarginTop">16dp</dimen>

    <dimen name="traslucentStatusMargin">25dp</dimen>
    <dimen name="traslucentPhotoMarginTop">41dp</dimen>


    <style name="MaterialNavigationDrawerTheme" parent="Theme.AppCompat.Light.NoActionBar" >
        <item name="belowToolbar">false</item>
        <item name="actionBarOverlay">false</item>
        <item name="actionBarOverlayAlpha">1.0</item>
        <item name="drawerActionBarStyle">@null</item>
    </style>

jjhesk avatar Jun 30 '15 02:06 jjhesk

mSlidingMenu.attachToActivity(activity, SlidingMenu.SLIDING_CONTENT, true);

Set slideStyle to SlidingMenu.SLIDING_CONTENT and pass true as third parameter (boolean actionbarOverlay) works for me.

chih-hao-li avatar Jul 06 '15 10:07 chih-hao-li

I confirm that @chih-hao-li hack do the work. (But this is not a solution. The code need to be fixed)

pguilbot avatar Jan 08 '16 23:01 pguilbot

@pguilbot how to fix ?

NoahZu avatar Jul 04 '16 06:07 NoahZu

@NoahZu I don't know if a fix exist. The only solution to get a full height sliding menu (with a transparent status bar) was to used this method : mSlidingMenu.attachToActivity(activity, SlidingMenu.SLIDING_CONTENT, true); Changing the styles.xml file was not working (Api 15 and up)

pguilbot avatar Jul 04 '16 07:07 pguilbot

thanks, I have salved it. This is a solution https://github.com/dalong982242260/FangTantan

NoahZu avatar Jul 13 '16 00:07 NoahZu