Created
April 28, 2022 09:39
-
-
Save GianpaMX/77ae22c639f1ef0a061324f01e7847f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val transition = updateTransition(selectedExpense != null, label = "transition") | |
val height by transition.animateDp( | |
label = "height", | |
transitionSpec = { tween(bottomSheeAnimationInMillis) }, | |
targetValueByState = { isItSelected -> | |
configuration.screenHeightDp.dp * if (isItSelected) 1.0f else 0.8f | |
} | |
) | |
val roundCornerRadio by transition.animateDp( | |
label = "roundCorners", | |
transitionSpec = { tween(bottomSheeAnimationInMillis) }, | |
targetValueByState = { isItSelected -> | |
if (isItSelected) 0.dp else 12.dp | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment