More animation

This commit is contained in:
Niels Andriesse 2021-06-16 15:54:00 +10:00
parent bdc5a0e5d9
commit c831c8a31b
2 changed files with 13 additions and 0 deletions

View File

@ -34,9 +34,21 @@ class InputBarRecordingView : RelativeLayout {
alpha = animator.animatedValue as Float alpha = animator.animatedValue as Float
} }
animation.start() animation.start()
animateDotView()
pulse() pulse()
} }
private fun animateDotView() {
val animation = ValueAnimator.ofObject(FloatEvaluator(), 1.0f, 0.0f)
animation.duration = 500L
animation.addUpdateListener { animator ->
dotView.alpha = animator.animatedValue as Float
}
animation.repeatCount = ValueAnimator.INFINITE
animation.repeatMode = ValueAnimator.REVERSE
animation.start()
}
private fun pulse() { private fun pulse() {
val collapsedSize = toPx(80.0f, resources) val collapsedSize = toPx(80.0f, resources)
val expandedSize = toPx(104.0f, resources) val expandedSize = toPx(104.0f, resources)

View File

@ -31,6 +31,7 @@
android:orientation="horizontal"> android:orientation="horizontal">
<View <View
android:id="@+id/dotView"
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
android:background="@drawable/circle_tintable" android:background="@drawable/circle_tintable"