当前位置: 首页>>代码示例>>Java>>正文


Java SurfaceHolder.removeCallback方法代码示例

本文整理汇总了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();
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:17,代码来源:CaptureActivity.java

示例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();
}
 
开发者ID:kkyflying,项目名称:CodeScaner,代码行数:19,代码来源:CaptureActivity.java

示例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();
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:19,代码来源:CaptureActivity.java

示例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);
    }
}
 
开发者ID:10045125,项目名称:QrCode,代码行数:24,代码来源:QrCodeView.java

示例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();
}
 
开发者ID:mercuriete,项目名称:android-mrz-reader,代码行数:17,代码来源:CaptureActivity.java

示例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();
}
 
开发者ID:yun2win,项目名称:tvConnect_android,代码行数:18,代码来源:CaptureActivity.java

示例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();
}
 
开发者ID:dufangyu1990,项目名称:LeCatApp,代码行数:21,代码来源:CaptureActivity.java

示例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();
}
 
开发者ID:yinhaojun,项目名称:ZxingForAndroid,代码行数:35,代码来源:CameraPreview.java

示例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;
    }
}
 
开发者ID:yzzslow0,项目名称:Ec2m,代码行数:14,代码来源:CamaraActivity.java

示例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();
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:15,代码来源:AppInvCaptureActivity.java

示例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);
    }
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:12,代码来源:UIScanView.java

示例12: surfaceCreated

import android.view.SurfaceHolder; //导入方法依赖的package包/类
@Override
public void surfaceCreated(SurfaceHolder holder) {
    holder.removeCallback(this);
    drawSurfaceView(holder);
}
 
开发者ID:coolspan,项目名称:LiveWallpaper,代码行数:6,代码来源:LiveWallpaperView.java


注:本文中的android.view.SurfaceHolder.removeCallback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。