问题
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