Exclude view from android blur

I have VideoViewin my application.

I set the blur flags in my activity

getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
            WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

The problem is that even the video is VideoViewblurred, which I don’t want.

When VideoViewreplaced with ImageViewwith the specified source, it does not blur at all.

Is there any solution to avoid this blurring in VideoView?

+3
source share
1 answer

This is because VideoView creates a surface behind your application surface. The FLAG_BLUR_BEHIND flag blurs all surfaces below the surface of your application. This is why the ImageView does not blur because it is on the surface of your application and not on the surface behind it.

+1

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


All Articles