安卓:: VideoView内的滚动型VideoView

2023-09-12 23:58:03 作者:不谈情

我有一个VideoView是内部的滚动视图。当我滚动滚动视图中,VideoView不会滚动它。它就像它的位置是固定的。我怎样才能正确地滚动VideoView与滚动视图的所有其他元素的滚动?

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?

推荐答案

显示器通常分为两条管道

The display is usually divided into two pipelines

在帧缓存管线 - 这是是显示所有的图形。所有的UI显示元素进入这个pipline 在视频缓冲管道 - 这是你的视频数据被转移到

现在,当你宣布从表面上看,你拿起在UI的一些屏幕空间说这是哪里的视频将被显示。因此,所有其他UI元素将不能占据该空间。

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.

所以,到现在为止,你不能滚动在Android上的视频。

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