Code example for SurfaceHolder

Methods: removeCallback

0
 
	@Override 
	public void onPause() 
	{ 
		stopCam(); 
		camSurfHolder.removeCallback(this);
		this.finish();
		super.onPause(); 
	} 
 
	public void surfaceCreated(SurfaceHolder sh)
	{ 
	} 
 
	public void surfaceChanged(SurfaceHolder sh, int format, int w, int h)
	{ 
		if(cam != null)
		{ 
			if(previewRunning) cam.stopPreview();
			Camera.Parameters p = cam.getParameters();
			p.setRotation(orientation);