Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScrollView overlay during video playback

Is it possible to have an overlay pop up upon tapping the screen, during fullscreen video playback? This overlay would contain a ScrollView of Images and respective Text labels.

Imagine if you will, a movie streaming in fullscreen. Upon tapping the screen, a scrollable overlay would appear across the bottom with a photo and name of all actors in that particular scene. Hope the example helped.

From what I've managed to find, the 'RelativeLayout' could provide the answer I need. Almost all the questions I found relating to this, concerned either overlays on Maps or Camera feed, not streaming video.

Any help is much appreciated! Thanks!

will keep diggin'...

like image 658
Michael Avatar asked Apr 28 '11 15:04

Michael


1 Answers

Step #1: Create a RelativeLayout

Step #2: Put the VideoView or SurfaceView in the RelativeLayout

Step #3: Put the ScrollView in the RelativeLayout as a later child than the VideoView/SurfaceView (e.g., later in the XML)

Step #4: Make the ScrollView be gone (android:visibility="gone")

Step #5: On a touch event on the VideoView/SurfaceView, make the ScrollView be visible using setVisibility()

Step #6: Have some way to dismiss the ScrollView (e.g., BACK button), returning it to its normal "gone" state

like image 109
CommonsWare Avatar answered Sep 28 '22 19:09

CommonsWare