开发者

Exclude view from blurring android

开发者 https://www.devze.com 2023-02-09 02:03 出处:网络
I am having a VideoView in my application. I have set blur flags in my activity getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,

I am having a VideoView in my application.

I have set blur flags in my activity

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

The problem is even the video in the VideoView is blurring, which I don't want.

When VideoView is replaced by an Im开发者_开发百科ageView with a specified source, its not blurry at all.

Is there any solution to avoid this blur in VideoView?


That's because a VideoView creates a surface behind your application's surface. The FLAG_BLUR_BEHIND flag blurs all the surfaces under your application's surface. This is why the ImageView is not blurry because it is in your application's surface, not in a surface behind it.

0

精彩评论

暂无评论...
验证码 换一张
取 消