Reputation: 1687
I have a viewpager which has two views in it. On the first view I have a list of videos and on the other one I play the video.
The issue is when I play the video on the second view and if I want to go back to the first view, there is a black rectangle remaining from the video. it disappears after a few seconds.
I am using a galaxy note running ICS.
Can it be because of memory usage?
Thanks,
Upvotes: 0
Views: 2570
Reputation: 1687
I solved this problem long time ago by setting background color of the videoview to some color and then making it '0' onVideoPrepared().
Upvotes: 3
Reputation: 3450
Well, do you "stop()" the video when you start dragging the page ?
if not, then you need to add a OnPageChangeListener to the viewpager, so when you start scrolling/dragging the page, you stop the videoview, that should fix your problem, the more probable thing is that for optimization reasons does not want to be playing the video as dragging the page so puts a "picture" of the video while moving.
Upvotes: 0