Code example for MediaController

Methods: hide, setEnabled, show

0
			mIsPrepared = true; 
			if (mOnPreparedListener != null) { 
				mOnPreparedListener.onPrepared(mMediaPlayer); 
			} 
			if (mMediaController != null) { 
				mMediaController.setEnabled(true); 
			} 
			mVideoWidth = mp.getVideoWidth(); 
			mVideoHeight = mp.getVideoHeight(); 
			if (mVideoWidth != 0 && mVideoHeight != 0) { 
				getHolder().setFixedSize(mVideoWidth, mVideoHeight); 
				if (mSurfaceWidth == mVideoWidth 
						&& mSurfaceHeight == mVideoHeight) { 
					if (mSeekWhenPrepared != 0) { 
						mMediaPlayer.seekTo(mSeekWhenPrepared); 
						mSeekWhenPrepared = 0; 
					} 
					if (mStartWhenPrepared) { 
						mMediaPlayer.start(); 
						mStartWhenPrepared = false; 
						if (mMediaController != null) { 
							mMediaController.show(); 
						} 
					} else if (!isPlaying() 
							&& (mSeekWhenPrepared != 0 || getCurrentPosition() > 0)) { 
						if (mMediaController != null) { 
							mMediaController.hide(); 
						} 
					} 
				} 
			} else { 
				if (mSeekWhenPrepared != 0) {