class ReadPlayView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) :
View(context, attrs, defStyleAttr) {
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
constructor(context: Context) : this(context, null)
private var singleWidth = context.resources.getDimension(R.dimen.dimen2)
private var space = context.resources.getDimension(R.dimen.dimen3)
private var max = 12f//波动的最长长度
val lines: ArrayList<WavMode> = ArrayList()
private val variable = 1f//每次增减的变量
private val paint = Paint()
private var timer: Timer? = null
自定义view-音频播放中标识动画,竖线来回波动
最新推荐文章于 2024-05-16 11:44:45 发布
本文介绍如何在Android应用中创建一个自定义View,用于显示音频播放时的竖线波动动画,详细讲解了实现波动效果的步骤和关键代码。

最低0.47元/天 解锁文章
736

被折叠的 条评论
为什么被折叠?



