Android custom camera to achieve timing camera function
•
Android
This blog introduces you to the Android custom camera and the countdown camera function. First, the surfaceview control is used to display the preview area of the photo. The following is the layout file: activity_ main.xml
MainActivity.java
There are two points to note: for camera, it is horizontal by default, so it is horizontal when previewing and saving pictures, and the angle needs to be adjusted.
Set camera preview method:
Adjust the angle when saving the picture:
The renderings are as follows:
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码