Android imitation wechat click photo long press video function example code

This article is a look at Guo Shen's official account, which is only for learning.

Add in modlue gradle

Add in project gradle

Where to add

It's easy to use, just in the XML layout

Special attention:

These three attributes are for the cameras before and after page switching, but there are bugs in them. At that time, I looked online and found a big pit. There is a code in line 394 of the source code

Because the pixels of the front camera and the rear camera are different, the width and height in this method cannot be set. If necessary, you can study it yourself. Therefore, temporarily make the length and width of this button 0dp, so it will not be displayed.

Then look at the writing in activity.

After writing the code here, I found that the camera did not start by default after startup, because there are still some things missing.

That's OK.

------------------------------------------------------------------------------------------------------------------

Project address

https://github.com/CJT2325/CameraView

The above is the example code of Android imitation wechat click photo long press video function introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for programming Xiaoqiao website!

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
分享
二维码
< <上一篇
下一篇>>