在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中滑动视频。
分享到:
相关推荐
Scrollview中嵌套ViewPager和ListView常出现的问题: ViewPager如果在Scrollview中使用,并且宽高指定为match_parent或者wrap_content则不会显示内容,但是如果将高度指定为200dp,则ViewPager则会将内容显示到屏幕...
水平 横线 listView 嵌套在 ScrollView中 已经处理滑动卡和嵌套在scrollview 中显示的相关问题
很多朋友因项目需求问题需要在ScrollView中嵌套使用ListView或ScrollView 但是彼此的滑动事件会发生冲突,网上大多数都是计算ListView的高度来解决这个问题,但个人亲手尝试 结果ListView的Item要是过多的话ListView...
在一些项目中需要用到listview嵌套在scrollview中的情况,但会碰到焦点冲突,scrollview焦点覆盖listview造成listview不能滑动,这种情况时要在scrollview中添加android:fillViewport="true"这句,并在listview中...
ScrollView中嵌套
解决ScrollView中嵌套ListView不显示问题
本Demo展示如何在ScrollView中嵌套ListView,通过自定义ListView有效解决冲突问题
解决系统ListView不能直接放在ScrollView中,自定义了一个ListView,实现ListView全部功能
titanium ScrollView
ScrollView 嵌套ScrollView 事件分发问题
ScrollView中嵌套ListView的例子和解决方案
scrollview与listview嵌套问题
http://blog.csdn.net/wishes222/article/details/9970805
ScrollView中嵌套ListView,还可以嵌套多个listview 解决无法共存问题。放到项目中可以直接用
前言:今天在开发的时候遇到这样的问题,最外层是ScrollView,里面嵌套了一个横向滑动的日历控件,在滑动日历的时候很卡顿。看到这种问题,自然而然的就会想到scrollview和其他可滑动控件的冲突问题。 解决思路 用户...
ScrollView中嵌套listview 解决滑动冲突问题
解决ScrollView嵌套ListView问题的几种方案
一个scrollView中嵌入图片,高仿微博封面图,实现下拉放大图片的功能
自定义一个滑块,可以在竖直方向上滑动并且与ScrollView结合起来使用。滑动滑块,scrollView跟着滑动。滑动ScrollView,滑块也跟着动。
用于解决scrollview组件嵌套listview组件时候 两者之间的冲突问题