android.hardware.Camera.setAutoFocusMoveCallback()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中android.hardware.Camera.setAutoFocusMoveCallback()方法的一些代码示例,展示了Camera.setAutoFocusMoveCallback()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Camera.setAutoFocusMoveCallback()方法的具体详情如下:
包路径:android.hardware.Camera
类名称:Camera
方法名:setAutoFocusMoveCallback

Camera.setAutoFocusMoveCallback介绍

暂无

代码示例

代码示例来源:origin: googlesamples/android-vision

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false}
 * otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: googlesamples/android-vision

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false} otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: googlesamples/android-vision

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false}
 * otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (cameraLock) {
    if (camera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      camera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: EdwardvanRaak/MaterialBarcodeScanner

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false} otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: TrustWallet/trust-wallet-android-source

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false} otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: peekler/GDG

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false}
 * otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: EzequielAdrianM/Camera2Vision

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false} otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: adafruit/Bluefruit_LE_Connect_Android

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false} otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

代码示例来源:origin: thegenuinegourav/Questor

/**
 * Sets camera auto-focus move callback.
 *
 * @param cb the callback to run
 * @return {@code true} if the operation is supported (i.e. from Jelly Bean), {@code false}
 * otherwise
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean setAutoFocusMoveCallback(@Nullable AutoFocusMoveCallback cb) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
    return false;
  }
  synchronized (mCameraLock) {
    if (mCamera != null) {
      CameraAutoFocusMoveCallback autoFocusMoveCallback = null;
      if (cb != null) {
        autoFocusMoveCallback = new CameraAutoFocusMoveCallback();
        autoFocusMoveCallback.mDelegate = cb;
      }
      mCamera.setAutoFocusMoveCallback(autoFocusMoveCallback);
    }
  }
  return true;
}

相关文章