Hesam
Hesam

Reputation: 53600

Android, how can I remove controls of VideoView?

In my project I have a Video View that I put it in splash screen. Everything is OK and I can see it in splash screen but the problem is when it shows, control bar (back, next, time length) will show as well that I want see it. How can I disable it?

In the sample code (that I got my idea), it had

mVideoView.requestFocus();

that I removed it but still I think it has focus and because of this it shows control bar. Am I right? How can I prevent and don't let to show?

update: This is my code:

mVideoView = (VideoView) findViewById(R.id.splash_video);
mVideoView.setVideoURI(Uri.parse("android.resource://com.infindo.motogp/raw/sp"));
mVideoView.setMediaController(new MediaController(this));

Upvotes: 13

Views: 15602

Answers (3)

Deni Rohimat
Deni Rohimat

Reputation: 162

You just have to remove videoView.setMediaController();

Upvotes: 4

vishambar pandey
vishambar pandey

Reputation: 31

Try to hide it by using this

videoView=findViewById(R.id.video_id);

videoView.setOnTouchListener();

Upvotes: 1

SERPRO
SERPRO

Reputation: 10067

Already answered here

Just remove setMediaController. If you don't have it, paste your code so we can see what could be the problem.

Upvotes: 25

Related Questions