feat: 针对部分场景使用 MD3E 动画曲线
This commit is contained in:
parent
24a90ea5f8
commit
6ed4fe7e19
1 changed files with 9 additions and 1 deletions
|
|
@ -2,6 +2,10 @@ package cn.super12138.todo.ui.pages.main
|
|||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.expandVertically
|
||||
import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.animation.shrinkVertically
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -113,7 +117,11 @@ fun ProgressFragment(
|
|||
)
|
||||
)
|
||||
}
|
||||
AnimatedVisibility(remainTasks != 0) {
|
||||
AnimatedVisibility(
|
||||
visible = remainTasks != 0,
|
||||
enter = fadeIn(MaterialTheme.motionScheme.fastSpatialSpec()) + expandVertically(MaterialTheme.motionScheme.fastSpatialSpec()),
|
||||
exit = fadeOut(MaterialTheme.motionScheme.fastSpatialSpec()) + shrinkVertically(MaterialTheme.motionScheme.fastSpatialSpec()),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.tip_remain_tasks, remainTasks),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
|
|
|
|||
Loading…
Reference in a new issue