开发者

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 t开发者_JAVA技巧he MediaController show always?

Thanks Chris


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


The below code shows MediaController always:

VideoView videoView;   
MediaController mc;  

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜