I would like to blur the background of the content pane when the DrawerLayout is open. I noticed that there is the ability to change the dim color by setting setScrimColor but I would like to blur the background. Is there a way to achieve this?
Asked
Active
Viewed 1,590 times
2 Answers
0
The process involves the following stages:
Get a snapshot of the whole drawer layout.
Crop it to the exact size of your menu.
Downscale it quite a bit (a factor of 8 is pretty good).
Blur that image.
Have a custom view that displays part of an image right behind of where your menu will appear.
- As you slide the drawer show a larger part of that image.
Please refer this answer
Blur background of Navigation Drawer
Or you can use one of these libraries

Naveen Dew
- 1,295
- 11
- 19
0
Check out this library: Blurry. it takes a View
or a Bitmap
, blurs it and casts it to a ViewGroup
or an ImageView
. So just run Blurry.with(context).capture(parentView).into(parentView);
whenever the drawer is opened.
Where parentView
is the container that holds everything.

birukhimself
- 193
- 3
- 14