Android Show MediaController

I am adding a MediaController to the VideoView, but it will not appear unless I touch the phone. After a while, the controller disappears.

Is there any way to show MediaController always?

Thank you, Chris

+6
android controller media videoview
source share
2 answers

By default, the mediacontroller disappears for 3 seconds of user inactivity. you can set seconds timeouts to

new media controller().show(50000); 

check this link

+10
source share

The code below always displays MediaController:

 VideoView videoView; MediaController mc; videoView.setMediaController(new MediaController(this) { public void hide() { System.out.println("HIDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEHELLLOO"); mc.show(); } }); 
+5
source share

All Articles