Code example for SurfaceHolder

Methods: removeCallback

0
		public void stopPreview() 
		{ 
			if ( hasCallback )
			{ 
				Log.v(TAG, "CameraPreview: Remove callback");
				holder.removeCallback(CameraPreview.this);
				//cam_view.removeView(mCamSV); 
				//mCamSV = null; 
				context.runOnUiThread(new Runnable() {
					@Override 
					public void run() { 
						Log.i(TAG, "CameraPreview: Set gone...");
						mCamSV.setVisibility(View.GONE);
						Log.i(TAG, "CameraPreview: Set gone done");
					} 
				}); 
				hasCallback = false;
			} 
		} 
 
		@Override