How to blur / decrease activity when popup is displayed in android

I use popupwindow to display options in Android. I tried to decrease / blur the activity when popupwindow is active, but I did not find a solution ... can someone help me.

I used the following code, but it does not work for me.

getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND); 
+4
source share
1 answer

Use it as follows:

 WindowManager.LayoutParams lp = dialog.getWindow().getAttributes(); lp.dimAmount=0.0f; dialog.getWindow().setAttributes(lp); dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND); 
+2
source

Source: https://habr.com/ru/post/1384708/


All Articles