currently, I'm working on a video-based app project. Now I'm struggling with some problems.
As you can see, I try to put a MediaController to control the video playback. But, there is a problem. The MediaController won't align to the center of the VideoView.
I tried to following some suggestion from:
- MediaController positioning over VideoView
- Positioning the MediaController over the VideoView
- MediaController Positioning - bind to VideoView
- Android MediaController position
But, none of them are work.
Here is my code:
video1 = findViewById(R.id.video_1);
video1.setVideoURI(videoPath);
MediaController mc = new MediaController(this);
mc.setMediaPlayer(video1);
video1.setMediaController(mc);
mc.setAnchorView(video1);
video1.start();
Any suggestions or solutions to my problem? Thank You.