Code example for SurfaceHolder

Methods: setFixedSize

0
		if (wr > hr)
		    width = (int) (boxHeight * ar);
		else 
		    height = (int) (boxWidth / ar);
		 
		holder.setFixedSize(width, height);
	} 
	 
	@Override 
	public void onBackPressed() { 
		if(mMediaPlayer!=null){
			mMediaPlayer.release();
		} 
		finish(); 
		super.onBackPressed(); 
	} 
 
	private Context getContext(){
		return this;
	}