pub trait Camera_AutoFocusCallback:
JObjRef
+ JObjNew
+ PartialEq
+ Debug {
const CLASS: &'static str = "android/hardware/Camera$AutoFocusCallback";
const OBJECT_SIG: &'static str = "Landroid/hardware/Camera$AutoFocusCallback;";
const DIM: u8 = 0u8;
// Required method
fn on_auto_focus(&self, success: bool, camera: &Camera);
}
👎Deprecated: 我们建议对新应用使用新的 android.hardware.camera2 API。
Expand description
用于通知相机自动对焦完成的回调接口。不支持自动对焦的设备将收到对此接口的“假”回调。 如果您的应用需要自动对焦,并且不应安装在没有自动对焦的设备上,则您必须在 清单元素中声明您的应用使用 android.hardware.camera.autofocus 功能。
Provided Associated Constants§
Sourceconst CLASS: &'static str = "android/hardware/Camera$AutoFocusCallback"
👎Deprecated: 我们建议对新应用使用新的 android.hardware.camera2 API。
const CLASS: &'static str = "android/hardware/Camera$AutoFocusCallback"
android/hardware/Camera$AutoFocusCallback
Sourceconst OBJECT_SIG: &'static str = "Landroid/hardware/Camera$AutoFocusCallback;"
👎Deprecated: 我们建议对新应用使用新的 android.hardware.camera2 API。
const OBJECT_SIG: &'static str = "Landroid/hardware/Camera$AutoFocusCallback;"
Landroid/hardware/Camera$AutoFocusCallback;
Required Methods§
Sourcefn on_auto_focus(&self, success: bool, camera: &Camera)
👎Deprecated: 我们建议对新应用使用新的 android.hardware.camera2 API。
fn on_auto_focus(&self, success: bool, camera: &Camera)
当相机自动对焦完成时调用。如果相机不支持自动对焦并且调用了 autoFocus,则将立即调用 onAutoFocus,并将 false 值 success 设置为 true。
自动对焦例程完成后不会锁定自动曝光和自动白平衡。
success
如果对焦成功,则为 true,否则为 false
camera
相机服务对象
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.