当前位置:网站首页>微信录制视频转圈效果如何实现?
微信录制视频转圈效果如何实现?
2022-06-23 22:13:00 【Android指南】

早上好,我是老北,公众号「GitHub 指北」会推荐 GitHub 上有用的项目,挖掘开源的价值,欢迎关注。
我的引语
微信聊天,发送一段录制视频,长按按钮,在录制过程中有个转圈效果,这个效果如何实现的呢?如果自己写大概涉及知识点 Android 自定义 View 中的 drawArc 绘制弧线,不过我们可以先去 GitHub 找找有没有类似的库,原则是“很多时候你压根不需要了解太多原理,只需站在巨人的丁丁上即可”,所谓前人种树后人好乘凉。
很好,GitHub 上还真有,名为 CameraVideoButton,仿 Instagram 用于拍摄照片或录制视频的动画按钮,推荐给你,语言是
Kotlin,话说 GitHub 真是个大宝藏。
效果预览

使用
项目和 app build.gradle:
allprojects {
repositories {
//...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.iammert:CameraVideoButton:0.2'
}
xml 引用:
<com.iammert.library.cameravideobuttonlib.CameraVideoButton android:id="@+id/button" android:layout_width="120dp" android:layout_height="120dp" app:cvb_recording_color="#D438A2"/>
代码回调:
videoRecordButton.actionListener = object : CameraVideoButton.ActionListener{
override fun onStartRecord() {
Log.v("TEST", "Start recording video")
}
override fun onEndRecord() {
Log.v("TEST", "Stop recording video")
}
override fun onDurationTooShortError() {
Log.v("TEST", "Toast or notify user")
}
override fun onSingleTap() {
Log.v("TEST", "Take photo here")
}
}
GitHub 地址
https://github.com/iammert/CameraVideoButton
以上,便是今日分享,觉得内容不错的,还请点个「赞」支持下,谢谢您。
边栏推荐
- kubernetes之常用核心资源对象
- Oracle关闭回收站
- 浩哥的博客之路
- Fabric.js 手动加粗文本iText
- Why do MySQL indexes use b+ trees at the bottom? After reading this article, you can easily handle the interview.
- PyQt5_ Qtablewidget paging radio right-click menu control
- Stm32-------adc (voltage detection)
- 【Try to Hack】masscan
- To ensure the safety of groups with special difficulties, Guangzhou Civil Affairs made every effort to do a good job in the three prevention work
- 远程办公之:如何成为时间管理大师?| 社区征文
猜你喜欢

【设计】1359- Umi3 如何实现插件化架构

STM32-------外部中斷

微信视频号如何用 PC 电脑做直播?

FANUC机器人SRVO-050碰撞检测报警原因分析及处理对策(亲测可用)

“山大地纬杯”第十二届山东省ICPC大学生程序设计竞赛

Autofac details

嵌入式接口之TIM定时器与NVIC的STM32模板库函数的一些解释

Image segmentation - data annotation

Generate post order traversal according to pre order traversal and mid order traversal

7、STM32——LCD
随机推荐
Preliminary understanding of 3D printing and laser cutting process
Nlog详解
Oracle turn off recycle bin
Kotlin coroutine asynchronous flow
NLog details
谈谈数字化转型晓知识
STM32------ADC(电压检测)
远程办公之:如何成为时间管理大师?| 社区征文
Stm32----- timer
WebService客户端请求失败 can not create a secure xmlinputfactory
C # read the occupied size of memory module and hard disk
Desai wisdom number - histogram (basic histogram): the way to celebrate father's day in 2022
ORB_ Slam3 environment setup and demo demonstration
短视频挺进在线音乐腹地
Telecommuting: how to become a master of time management| Community essay solicitation
有哪些劵商推荐?在线开户安全么?
The sandbox and bayz have reached cooperation to jointly drive the development of metauniverse in Brazil
【Try to Hack】masscan
E: Unable to acquire lock /var/lib/dpkg/lock
PHP的curl功能扩展基本用法