RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.82k stars 407 forks source link

Fotoapparat disables continuous autofocus when tapping on focusView field #312

Closed MrSilverstein closed 5 years ago

MrSilverstein commented 5 years ago

I am using the Fotoapparat nicely so far. My Fotoapparat builder is configured as following:

        fotoapparat = Fotoapparat
                .with(getContext())
                .into(cameraView)
                .focusMode(firstAvailable(
                        FocusModeSelectorsKt.continuousFocusPicture(),
                        FocusModeSelectorsKt.autoFocus()))
                .focusView(focusView)
                .lensPosition(back())
                .build();

whereas cameraView is from type io.fotoapparat.view.CameraView and focusView is io.fotoapparat.view.FocusView.

Version: 'io.fotoapparat:fotoapparat:2.3.3' Java 8 API minSDK 19

  1. When I move around my mobile it keeps focusing on current focal point automatically , thanks to focusMode was set to autoFocus/continuousFocusPicture.
  2. When I tap manually with my finger on the screen, the camera focuses on the tapped position, thanks to focusView(focusView).
  3. BUT when I tap (2.) the continuous focusing (1.) is not more working anymore.

Feels like tapping deactivates the continuous/autofocus mode?

Can I keep both modes in hybrid mode? I want to tap with my finger and also move around my handy and fokus on that position.. is that possible? Thnks in advance

MrSilverstein commented 5 years ago

I think It is correct that tapping is going to deactivate continuousFocus. So no problem here.

But a timeout in the builder would be nice, after what time (after tapping) it shall go back to continuousFocus mode?