Question

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.

Screenshot

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top