Code example for SurfaceHolder

Methods: setKeepScreenOn

0
	} 
 
	private SurfaceHolder.Callback mCallback = new SurfaceHolder.Callback() {
		@Override 
		public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { 
			holder.setKeepScreenOn(true); 
			if (mListener != null) 
				mListener.onSurfaceChanged(holder, format, width, height); 
		} 
 
		@Override 
		public void surfaceCreated(SurfaceHolder holder) { 
			mSurfaceHolder = holder; 
			if (mListener != null) 
				mListener.onSurfaceCreated(holder); 
		} 
 
		@Override 
		public void surfaceDestroyed(SurfaceHolder holder) { 
			if (mListener != null) 
				mListener.onSurfaceDestroyed(holder);