I need to display a video with an action bar on the top bottom of it.
I'm currently using a VideoView together with MediaController but I can't find a way to put the MediaController on the top bottom of the VideoView.
Actually, I cannot even achieve to have the MediaController outside the VideoView but on the bottom of it! It always appears somewhere on the bottom of the VideoView but with a large padding!
My current code is :
VideoView video_view = (VideoView) getView().findViewById(R.id.video_view);
video_view.setVideoURI(video_uri);
MediaController controller = new MediaController(video_view.getContext())
{
@Override
public void hide()
{
this.show(0);
}
@Override
public void setMediaPlayer(MediaPlayerControl player)
{
super.setMediaPlayer(player);
this.show();
}
};
controller.setAnchorView(video_view);
video_view.setMediaController(controller);
video_view.start();