`
dawuafang
  • 浏览: 1112991 次
文章分类
社区版块
存档分类
最新评论

关于ScrollView中加入VideoView的问题

 
阅读更多

在ScrollView中加入VideoView,当ScrollView滑动后,VideoView却不动,仔细观察,发现VideoView被分为了两层,后面一层是跟着ScrollView滑动,而前面一层不懂。在网上找原因,在一个国外网站上找到了答案:

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..

网站链接:http://stackoverflow.com/questions/4312585/androidvideoview-inside-a-scrollview

这一段大致是说,视频层和UI层,视频层是不关心UI层的变化,所以,建议不要在android中滑动视频。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics