-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Android Studio 4.1 Development Essentials – Java Edition
By :

71.6 Adding the MediaController to the Video View
As the VideoPlayer application currently stands, there is no way for the user to control playback. As previously outlined, this can be achieved using the MediaController class. To add a controller to the VideoView, modify the configureVideoView() method once again:
package com.ebookfrenzy.videoplayer;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.VideoView;
import android.net.Uri;
import android.widget.MediaController;
public class MainActivity extends AppCompatActivity {
private VideoView videoView;
private MediaController mediaController;
.
.
private void configureVideoView() {
final VideoView videoView =
...
Change the font size
Change margin width
Change background colour