Disable dark fading in Navigation Drawer
Is there a way to disable the dark fading effect for the background view in the Navigation Drawer View in Android?
Solution 1:
You can use setScrimColor(int color)
method. As default color is used 0x99000000
. So if you don't want faded
background, set transparent
color in this method.
mDrawerLayout.setScrimColor(getResources().getColor(android.R.color.transparent));
Solution 2:
Addition to koso's answer: you can directly call the colors from Color class like this:
mDrawerLayout.setScrimColor(Color.TRANSPARENT);