How to open camera Activity in selected Area

2019-07-22 09:47发布

问题:

Every Body, I am new in android world.So i need your help.

I Want to know that how we can open camera activity in selected area. In such a manner-

AS in given below screen-shot. It is not compulsory to open in circular area, in my app i can open in any customize area either may be circular , rectangular or in square shape:

回答1:

You have to use SurfaceView

In this page you can see an example: SurfaceViewExample



回答2:

You need surface holder and a surface view in your activity. If you need some explanation then check Android Camera Surface View link hope it will help you. Any doubt you can ask I will try to explain it.