Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android::VideoView inside a ScrollView

I have a VideoView that is inside a scrollView. When I scroll the scrollView, the VideoView does not scroll with it. It is like its position is fixed. How can I scroll the VideoView correctly with the scrolling of all other elements in the scrollView?

like image 212
George Avatar asked Nov 30 '10 10:11

George


1 Answers

The display is usually divided into two pipelines

  • Frame buffer pipeline - This is is where all your graphics is displayed. All the UI display elements go into this pipline
  • Video buffer pipeline - This is where your video data is diverted to.

Now when you declare a surface view you take up some screen space in the UI saying this is where the video will be displayed. So all other UI elements will not be able to occupy that space.

When scrolling happens your surface view will indeed be moved up or down depending on the scroll event but the problem is the video buffer pipeline does not care what happens in the frame buffer pipeline it goes on filling up the video data into the space in which it was initialised with.

So as of now you cannot scroll the video in android..

like image 199
bluefalcon Avatar answered Sep 24 '22 13:09

bluefalcon