質問

I'm using the commonsware camera library. My pictures look great, but when I get close to something I want to re-focus, but I haven't been able to do that. I have followed some of the read me documentation as seen here:

You can call autoFocus() on CameraFragment or CameraView to trigger any auto-focus behavior that you have configured via setFocusMode() on Camera.Parameters. You can call cancelAutoFocus() on CameraFragment or CameraView to ensure that auto-focus mode has been canceled.

I'm simply doing an onclicklistener on the screen, and want it to focus again, so that my picture is clear. Has anyone been successful in doing this?

役に立ちましたか?

解決

Apparently, you need to cancelAutoFocus() before you can trigger autoFocus() again to get a fresh autofocus.

I have filed an issue with, um, myself, to consider a better API here.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top