Disable dark fading in Navigation Drawer

后端 未结 4 712
天命终不由人
天命终不由人 2020-12-24 00:38

Is there a way to disable the dark fading effect for the background view in the Navigation Drawer View in Android?

4条回答
  •  Happy的楠姐
    2020-12-24 01:34

    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));
    

提交回复
热议问题