Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the controls in the VideoView in Android?

I am using VideoView for playing video in my app but I would like to hide the controls in it. How can I do that? Thanks.

like image 653
Karthik Avatar asked Mar 12 '12 05:03

Karthik


People also ask

What is video view in Android?

android.widget.VideoView. Displays a video file. The VideoView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the video so that it can be used in any layout manager, and provides various display options such as scaling and tinting.

How do I hide the controls on my Android?

Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.

How do I make Android videos full screen?

Tap the video you'd like to watch. At the bottom of the video player, tap full screen .


2 Answers

To the Controls in the VideoView, we can set MediaController to null.

videoView.setMediaController(null) 
like image 187
Sadeshkumar Periyasamy Avatar answered Sep 20 '22 17:09

Sadeshkumar Periyasamy


Try this:

MediaController ctrl = new MediaController(context); ctrl.setVisibility(View.GONE); videoView.setMediaController(ctrl); 
like image 22
ZimaXXX Avatar answered Sep 20 '22 17:09

ZimaXXX