Don't display the overlay with the Android Nav

2019-04-20 21:33发布

I was wondering if it's possible to remove the automatic overlay made by the recently implemented Navigation Drawer ? (The grey layer on the second picture)

enter image description here

1条回答
欢心
2楼-- · 2019-04-20 21:51

You just need to set setScrimColor(int color) to your DrawerLayout :

mDrawerLayout.setScrimColor(Color.WHITE);
// OR
mDrawerLayout.setScrimColor(Color.TRANSPARENT);

Here is the official documentation from Android API: DrawerLayout - setScrimColor().

Hope this solves your problem! : )

查看更多
登录 后发表回答