mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-05-28 20:08:35 +00:00
android: update animation time on switch tap
This commit is contained in:
@@ -120,9 +120,10 @@ fun StyledSwitch(
|
|||||||
val targetFrac = if (checked) 1f else 0f
|
val targetFrac = if (checked) 1f else 0f
|
||||||
animatedFraction.animateTo(targetFrac, progressAnimationSpec)
|
animatedFraction.animateTo(targetFrac, progressAnimationSpec)
|
||||||
}
|
}
|
||||||
|
if (progressAnimation.value > 0f) return@coroutineScope
|
||||||
launch {
|
launch {
|
||||||
progressAnimation.animateTo(1f, tween(100, easing = FastOutSlowInEasing))
|
progressAnimation.animateTo(1f, tween(175, easing = FastOutSlowInEasing))
|
||||||
progressAnimation.animateTo(0f, tween(100, easing = FastOutSlowInEasing))
|
progressAnimation.animateTo(0f, tween(175, easing = FastOutSlowInEasing))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user