Search code examples
android-layoutdrawerlayout

How to disable DrawerLayout Shadow


I am trying to disable the DrawerLayout shadow and i am not finding the relevant answer. can anyone please assist

thanks in advance

i have also tried setDrawerLayout(null,Gravity.Left) but it still does not work


Solution

  • mDrawerLayout.setScrimColor(Color.TRANSPARENT);
    

    I'm Assuming that's what you mean. The shadow on the drawers (in between the drawer and the background content) is disabled by default and can be set with the

    setDrawerShadow(Drawable shadowDrawable, int gravity)
    setDrawerShadow(int resId, int gravity)
    

    functions.