Chris
Chris

Reputation: 3807

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

Upvotes: 6

Views: 9048

Answers (2)

Android_programmer_camera
Android_programmer_camera

Reputation: 13349

The below code shows MediaController always:

VideoView videoView;   
MediaController mc;  

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

Upvotes: 5

Praveen
Praveen

Reputation: 91175

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

Upvotes: 10

Related Questions