Archie
07/11/2021, 2:14 PMState
holder for the font size? Just would want to be sure that this is the correct way since with `View`s (Correct me if I’m wrong), animating the font size directly isn’t the suggested (optimize) way of doing it.Archie
07/11/2021, 2:18 PMArchie
07/11/2021, 2:23 PMTextField
and it ssems that the Label animation works directly with the `TextStyle`:
val labelAnimatedStyle = lerp(
MaterialTheme.typography.subtitle1,
MaterialTheme.typography.caption,
labelProgress
)
So I guess its fine to do the same thing as well?Doris Liu
07/20/2021, 9:23 PMArchie
07/22/2021, 2:39 PMArchie
07/22/2021, 4:34 PMTransition
to replicate the animation but I can’t seem to wrap around how to seek the Transition
base on the current Swipe offset. I could easily create the expanding card with swiping, but I can’t figure out how to combine the swiping card animation with all other animation.
Right now, I am simply computing the current progress of the swipe by:
val swipeProgress = swipeableState.offset.value / expandedCardOffset
And using this swipeProgress
everywhere. like:
val appbarOffset by animateDpAsState(
targetValue = lerp(0.dp, 25.dp, swipeProgress.coerceAtLeast(0f)),
)
Do you have any advice? Thank in advnace.Doris Liu
07/22/2021, 7:00 PMArchie
07/23/2021, 1:23 PM