Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Show MediaController

I am adding MediaController to a VideoView, but it does not show up unless I tap the phone. The controller disappears after a while.

Is there a way I can have the MediaController show always?

Thanks Chris

like image 928
Chris Avatar asked Jun 04 '10 03:06

Chris


2 Answers

As Default mediacontroller will hide in 3 seconds of user's inactivity. you can set the timeout seconds by

new media controller().show(50000);

check this link

like image 186
Praveen Avatar answered Sep 21 '22 04:09

Praveen


The below code shows MediaController always:

VideoView videoView;   
MediaController mc;  

videoView.setMediaController(new MediaController(this)  
    {
        public void hide()
        {
            System.out.println("HIDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEHELLLOO");
            mc.show();
        }
    });
like image 30
Android_programmer_camera Avatar answered Sep 22 '22 04:09

Android_programmer_camera