Alternative to “FLAG_BLUR_BEHIND” in Android?

后端 未结 3 1680
野趣味
野趣味 2020-12-03 13:32

I can see that when I use the same flag as shown on the API-demos for blurring the background, I get a warning that it\'s deprecated:

\"The field Wind

3条回答
  •  误落风尘
    2020-12-03 14:35

    ok , there is probably no alternative that uses the API , unless maybe i've forgetting anything.

    i can however use dimming , which is cool too, as written here:

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

提交回复
热议问题