问题描述:

I am using Drawer Layout on my application's home screen to provide some menu options. when drawer opens I want to add some gradient or some invisibility to background activity. How can I do that?

I have used below two methods but it wont work and visibility od main screen remains same

mDrawerLayout.setDrawerShadow(getDrawable(R.drawable.loading_top_bar), GravityCompat.START);

and

mDrawerLayout.setScrimColor() Method

From both methods screen behind NavigationDrawer is clearly visible, I want to blur it so that it's visible but not clear

网友答案:

You can try to use

_drawerLayout.setScrimColor(Color.argb(128, 255, 255, 255));

you can create custom color with an opacity

相关阅读:
Top