本文整理匯總了Java中android.view.SurfaceHolder.removeCallback方法的典型用法代碼示例。如果您正苦於以下問題:Java SurfaceHolder.removeCallback方法的具體用法?Java SurfaceHolder.removeCallback怎麽用?Java SurfaceHolder.removeCallback使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.view.SurfaceHolder
的用法示例。
在下文中一共展示了SurfaceHolder.removeCallback方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
inactivityTimer.onPause();
ambientLightManager.stop();
cameraManager.closeDriver();
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例2: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
inactivityTimer.onPause();
ambientLightManager.stop();
beepManager.close();
cameraManager.closeDriver();
//historyManager = null; // Keep for onActivityResult
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例3: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
inactivityTimer.onPause();
ambientLightManager.stop();
beepManager.close();
cameraManager.closeDriver();
// historyManager = null; // Keep for onActivityResult
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例4: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
public void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
if (inactivityTimer != null) {
inactivityTimer.onPause();
}
if (ambientLightManager != null) {
ambientLightManager.stop();
}
if (beepManager != null) {
beepManager.close();
}
if (cameraManager != null) {
cameraManager.closeDriver();
}
if (!hasSurface) {
mSurfaceView = new SurfaceView(mActivity, null);
SurfaceHolder surfaceHolder = mSurfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
}
示例5: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
}
// Stop using the camera, to avoid conflicting with other camera-based apps
cameraManager.closeDriver();
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例6: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
inactivityTimer.onPause();
ambientLightManager.stop();
beepManager.close();
cameraManager.closeDriver();
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例7: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
/**
* 暫停活動監控器,關閉攝像頭
*/
@Override
protected void onPause() {
if (mHandler != null) {
mHandler.quitSynchronously();
mHandler = null;
}
// 暫停活動監控器
inactivityTimer.onPause();
// 關閉攝像頭
cameraManager.closeDriver();
if (!hasSurface) {
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例8: pause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
/**
* Pause scanning and the camera preview. Typically this should be called from the Activity's
* onPause() method.
*
* Call from UI thread only.
*/
public void pause() {
// This must be safe to call multiple times.
Util.validateMainThread();
Log.d(TAG, "pause()");
openedOrientation = -1;
if (cameraInstance != null) {
cameraInstance.close();
cameraInstance = null;
previewActive = false;
} else {
stateHandler.sendEmptyMessage(R.id.zxing_camera_closed);
}
if (currentSurfaceSize == null && surfaceView != null) {
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(surfaceCallback);
}
if(currentSurfaceSize == null && textureView != null && Build.VERSION.SDK_INT >= 14) {
textureView.setSurfaceTextureListener(null);
}
this.containerSize = null;
this.previewSize = null;
this.previewFramingRect = null;
rotationListener.stop();
fireState.previewStopped();
}
示例9: surfaceDestroyed
import android.view.SurfaceHolder; //導入方法依賴的package包/類
public void surfaceDestroyed(SurfaceHolder holder) {
System.out.println("surfaceDestroyed");
if (!isopen_camara)
return;
if (mCamera != null) {
holder.removeCallback(this);
mCamera.setPreviewCallback(null);
mCamera.stopPreview();
mCamera.lock();
mCamera.release();
mCamera = null;
}
}
示例10: onPause
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
protected void onPause() {
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
cameraManager.closeDriver();
if (!hasSurface) {
surfaceView = new SurfaceView(this);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
super.onPause();
}
示例11: onViewUnload
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
public void onViewUnload() {
super.onViewUnload();
inactivityTimer.shutdown();
mViewfinderView.recycleLineDrawable();
if (!hasSurface) {
SurfaceHolder surfaceHolder = mSurfaceView.getHolder();
surfaceHolder.removeCallback(this);
}
}
示例12: surfaceCreated
import android.view.SurfaceHolder; //導入方法依賴的package包/類
@Override
public void surfaceCreated(SurfaceHolder holder) {
holder.removeCallback(this);
drawSurfaceView(holder);
}