Video does not work properly with list in Android

I have video views on the list. During video playback at this time, if I scroll up and down the list, watching the video behaves abnormally. The videos seem to jump up and down. Answer this problem.

+7
android listview videoview
source share
3 answers

The video is drawn on SurfaceView, which works in its stream and does not synchronize with the user interface, so it jumps to your list when scrolling.

There are other answers that cover this question here and here .

The workaround is that if your videos have no sound and are not too large, you can use AnimationDrawable and a series of images or frames from your video. Download frames using AsyncTask and run the animation in onPostExecute.

+1
source share

You can always stop playing onScrollStateChanged.

0
source share

I, too, was at a dead end until I found this post by Ovidiu Latka: https://stackoverflow.com/a/428223/

In a short set of transparent background for your VideoView

Android: background = "# 0000"

0
source share

All Articles