VideoView in ViewFlipper is transparent when video is playing

无人久伴 提交于 2019-12-12 09:53:56

问题


I've got an Activity with two views set up in a ViewFlipper. One of the views is a layout with a GLSurfaceView and a few other widgets, the other just has a layout with a TextView and a VideoView. When I click on something in the GLSurfaceView, the ViewFlipper swaps so the video can play. In this screenshot, you can see the plain GLSurfaceView rendering a map on the left. On the right is what it looks like after the ViewFlipper has flipped and the video starts playing.

The empty transparent area where the GLSurfaceView shows through is where the video is supposed to be. I can hear it playing through the speaker and the timeline is moving forward, so I know it's playing.

I can post code if you need it, but there's a lot involved so it could get rather complicated.

Any ideas as to what's going on here?


回答1:


You cannot have two SurfaceViews in an activity that overlap, and I suspect that includes cases like ViewFlipper where technically they would not overlap due to visibility changes.



来源:https://stackoverflow.com/questions/3681976/videoview-in-viewflipper-is-transparent-when-video-is-playing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!