Code example for MediaController

Methods: setAnchorView, setMediaPlayer

0
				public void onPrepared(MediaPlayer mp) {
					onCancel(); 
					mMediaPlayer.start();
					setSurfaceViewScale(); 
					mMediaPlayer.seekTo(position);
					mc.setMediaPlayer(getMediaPlayerControl());
					mc.setAnchorView(video);
					 
					Handler handler = new Handler();
			        handler.post(new Runnable() {
			            public void run() { 
			                mc.setEnabled(true);
			                try{ 
			                	mc.show();
			                } catch (BadTokenException e) {
								Log.w(TAG,"Can't show media controller, activity may not running yet.",e);
							} 
			            } 
			        }); 
				} 
			});