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.
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.
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.
Tap the video you'd like to watch. At the bottom of the video player, tap full screen .
To the Controls in the VideoView
, we can set MediaController
to null
.
videoView.setMediaController(null)
Try this:
MediaController ctrl = new MediaController(context); ctrl.setVisibility(View.GONE); videoView.setMediaController(ctrl);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With