本文整理了Java中android.hardware.Camera.setAutoFocusMoveCallback()
方法的一些代码示例,展示了Camera.setAutoFocusMoveCallback()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Camera.setAutoFocusMoveCallback()
方法的具体详情如下:
包路径:android.hardware.Camera
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!