Don't display the overlay with the Android Navigation Drawer

烂漫一生 提交于 2019-12-22 04:00:59

问题


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)


回答1:


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! : )



来源:https://stackoverflow.com/questions/18129598/dont-display-the-overlay-with-the-android-navigation-drawer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!