사용자 정의 카메라 애플리케이션을 만들려고합니다. 사용자가이 애플리케이션에서 포커스 모드를 선택할 수있게하고 싶습니다.Android 카메라 터치 포커스
포커스 모드는 기본적으로 자동 초점입니다.
클릭 할 수 있도록 cameraView를 설정하면 화면에 한 지점을 터치 할 때 카메라의 초점이 그 지점에 오게됩니다. 어떻게 시작할 수 있니? 화면에 지점을 터치하면 아래 내 코드
public void takePhoto(File photoFile, String workerName, int width, int height, int quality) {
if (getAutoFocusStatus()){
camera.autoFocus(new AutoFocusCallback() {
@Override
public void onAutoFocus(boolean success, Camera camera) {
camera.takePicture(shutterCallback, rawCallback, jpegCallback);
}
});
}else{
camera.takePicture(shutterCallback, rawCallback, jpegCallback);
}
this.photoFile = photoFile;
this.workerName = workerName;
this.imageOutputWidth = width;
this.imageOutputHeight = height;
}
public void takePhoto(File photoFile, int width, int height, int quality) {
takePhoto(photoFile, null, width, height, quality);
}