Alternative to “FLAG_BLUR_BEHIND” in Android?

后端 未结 3 1681
野趣味
野趣味 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:37

    watch out that

    WindowManager.LayoutParams.FLAG_BLUR_BEHIND

    is deprecated.. (at least at Android 4.0 it leads to a black screen in background...)

    Reference (Source): http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html

    int FLAG_BLUR_BEHIND This constant is deprecated. Blurring is no longer supported.

    public static final int FLAG_BLUR_BEHIND
    
    Since: API Level 1
    This constant is deprecated.
    Blurring is no longer supported.
    
    Window flag: blur everything behind this window.
    
    Constant Value: 4 (0x00000004)
    

    what a pitty .. :( (was a nice effect ;))

提交回复
热议问题