How to remove Videoview buttons? Android

Asked

Viewed 41 times

1

I’m trying a way to take or hide the buttons of a Videoplayer (forward, pause, back) on android, because the video is part of Splashscreen

public class Splash extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);

    String uriPath = "android.resource://"+getPackageName()+"/raw/intro";
    Uri uri = Uri.parse(uriPath);
    mVideoView.setVideoURI(uri);

    mVideoView.setMediaController(new MediaController(this));
    mVideoView.seekTo(1);
    mVideoView.start();

}

I tried to use the functions mVideoView.canPause(); but I was unsuccessful

1 answer

2

I tried a few (thousands) of times, I managed using:

videoView.setMediaController(null)

Thus the buttons of the video view disappeared, and was only the video playing in autoplay

Browser other questions tagged

You are not signed in. Login or sign up in order to post.