开发者

Overlay VideoView but keep touch focus on underlying activities in Android

开发者 https://www.devze.com 2023-01-07 12:00 出处:网络
I\'m trying to create an app that will display a video in a VideoView in a transparent activity but keep the touch focus on any underlying activity. For example, if I have one app opened and my app is

I'm trying to create an app that will display a video in a VideoView in a transparent activity but keep the touch focus on any underlying activity. For example, if I have one app opened and my app is launched, the video will show but the user can still interact with the app they were previously viewing. I have the transparent activity and video working but I can not find a way to keep interaction开发者_JAVA技巧 in the activity under mine. Please tell me if this is possible and how to do it. Thanks

Matt


Set WindowManager.FLAG_NOT_TOUCH_MODAL for your transparent VideoView Activity Window. By doing this, it will by-pass the touch events on the area outside of your activity to the previous activity.

0

精彩评论

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

关注公众号