本文整理汇总了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);
}