I\'ve created a layout.xml file with the following XML, but I can\'t get the MediaController to appear at all.
By using show(0) media controller will be shown until hide() is called by an interaction with the player. I found unfortunately no way to prevent hide() yet;-(
MediaController mc = new MediaController(MPlayer.this);
mc.setMediaPlayer(MPlayer.this);
mc.setEnabled(true);
View mMediaControllerView = (View)findViewById(R.id.media_controller); //get it from your layout
mc.setAnchorView(mMediaControllerView);
mMediaControllerView.setOnTouchListener(mPlayerTouchListener);//also use show() in onTouchListener
new Handler().postDelayed(new Runnable() {
public void run() {
mc.show(0);
} }, 1500);
Wait for screen to buid in order to avoid a bug in android (1,5 seconds here)