What's the correct way to implement Tap To Focus for camera?

前端 未结 5 1500
难免孤独
难免孤独 2021-01-30 10:59

I\'m working on an app which has a custom camera screen, for which I\'m supposed to implement tap to focus, like in the Android(more specifically, the Galaxy S4) camera app.

5条回答
  •  星月不相逢
    2021-01-30 11:45

    One of the other answers causes your camera to discard the focus points previously given and return to continuous focus which I don't think makes sense.

    Also if you take a look at the link in the post the original answer uses parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO);

    I've implemented the above with this line of code instead of Continuous focus and it seems to work much better.

提交回复
热议问题