Stats

11 Contributors: 1 Monday, June 26, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap
Download eBook

Optimized VideoView

Download android eBook

Introduction

Playing a video using a VideoView which extends SurfaceView inside of a row of a ListView seems to work at first, until the user tries to scroll the list. As soon as the list starts to scroll, the video turns black (sometimes displays white). It keeps playing in the background but you can’t see it anymore because it renders the rest of the video as a black box. With the custom Optimized VideoView, the videos will play on scroll in the ListView just like our Instagram, Facebook, Twitter.

Related Examples