Make MediaController show without hide
I try to use MediaController to play music. I want the MediaController appear until the "back" button is pressed. Now I have try below code: MediaController mediaController = new MediaController(this){ @Override public void setMediaPlayer(MediaPlayerControl player) { super.setMediaPlayer(player); this.show(); } @Override public void show(int timeout) { super.show(0); } //instead of press twice with press once "back" button to back @Override public boolean dispatchKeyEvent(KeyEvent event) { if(event.getKeyCode() == KeyEvent.KEYCODE_BACK) { Activity a = (Activity)getContext(); a.finish(); }