选中态动画从 250ms 缩短到 150ms 让圆环填充消失更利落
This commit is contained in:
parent
6618c1863a
commit
275fc55c79
@ -78,7 +78,7 @@ fun DayCell(
|
|||||||
val transition = updateTransition(targetState = currentState, label = "dayCell")
|
val transition = updateTransition(targetState = currentState, label = "dayCell")
|
||||||
|
|
||||||
val revealProgress by transition.animateFloat(
|
val revealProgress by transition.animateFloat(
|
||||||
transitionSpec = { tween(250, easing = FastOutSlowInEasing) },
|
transitionSpec = { tween(150, easing = FastOutSlowInEasing) },
|
||||||
label = "revealProgress"
|
label = "revealProgress"
|
||||||
) { state ->
|
) { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
@ -88,7 +88,7 @@ fun DayCell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val contentColor by transition.animateColor(
|
val contentColor by transition.animateColor(
|
||||||
transitionSpec = { tween(250, easing = FastOutSlowInEasing) },
|
transitionSpec = { tween(150, easing = FastOutSlowInEasing) },
|
||||||
label = "contentColor"
|
label = "contentColor"
|
||||||
) { state ->
|
) { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
@ -102,7 +102,7 @@ fun DayCell(
|
|||||||
|
|
||||||
// 选中今天:实心填充 primaryContainer;其他状态不填充。
|
// 选中今天:实心填充 primaryContainer;其他状态不填充。
|
||||||
val selectedFillColor by transition.animateColor(
|
val selectedFillColor by transition.animateColor(
|
||||||
transitionSpec = { tween(250, easing = FastOutSlowInEasing) },
|
transitionSpec = { tween(150, easing = FastOutSlowInEasing) },
|
||||||
label = "selectedFillColor"
|
label = "selectedFillColor"
|
||||||
) { state ->
|
) { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
@ -113,7 +113,7 @@ fun DayCell(
|
|||||||
|
|
||||||
// 选中非今天:绘制描边圆,避免遮挡右上角角标。
|
// 选中非今天:绘制描边圆,避免遮挡右上角角标。
|
||||||
val selectedOutlineAlpha by transition.animateFloat(
|
val selectedOutlineAlpha by transition.animateFloat(
|
||||||
transitionSpec = { tween(250, easing = FastOutSlowInEasing) },
|
transitionSpec = { tween(150, easing = FastOutSlowInEasing) },
|
||||||
label = "selectedOutlineAlpha"
|
label = "selectedOutlineAlpha"
|
||||||
) { state ->
|
) { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
@ -167,7 +167,7 @@ fun DayCell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val lunarColor by transition.animateColor(
|
val lunarColor by transition.animateColor(
|
||||||
transitionSpec = { tween(250, easing = FastOutSlowInEasing) },
|
transitionSpec = { tween(150, easing = FastOutSlowInEasing) },
|
||||||
label = "lunarColor"
|
label = "lunarColor"
|
||||||
) { state ->
|
) { state ->
|
||||||
if (annotation.isHighlight) {
|
if (annotation.isHighlight) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user