Android Camera2 - Draw circle focus area

2019-09-14 04:51发布

I'm trying to develop a custom application that uses Camera 2 API and I would like to add the feature "tap to focus". In other words, when I tap on the screen to focus, it shows a circle of the focus area.

How can I draw the circle focus area?

I followed the Google Camera2Basic example.

Thank you.

1条回答
叛逆
2楼-- · 2019-09-14 05:27

May be enough is draw circle of tap area, not focus area? In this case You can save X and Y pos of tap and use it as center of circle. And You can use any tutorial for drawing over camera preview, like that.

查看更多
登录 后发表回答