Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 362
upile Avatar asked Sep 25 '13 15:09

upile


2 Answers

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.

like image 186
Carni Avatar answered Oct 16 '22 02:10

Carni


To disable the drawer layout shadow, the following line is enough ,

mDrawerLayout.setScrimColor(Color.TRANSPARENT);

like image 26
Nanda Gopal Avatar answered Oct 16 '22 02:10

Nanda Gopal