mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-26 17:57:42 +00:00
More animation
This commit is contained in:
parent
bdc5a0e5d9
commit
c831c8a31b
@ -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)
|
||||||
|
@ -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"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user