https://kotlinlang.org logo
#compose-android
Title
# compose-android
p

Pavel Shnyakin

03/18/2024, 1:02 PM
Hello! ModalBottomSheetLayout is jumping on fling Maybe someone found a workround to solve this problem?
b

brandonmcansh

03/18/2024, 1:10 PM
It’s the default animation spec used for bottom sheets (spring). You can swap it for tween to remove it
p

Pavel Shnyakin

03/18/2024, 1:23 PM
I dug into the guts of BottomSheet for so long, and the fix turned out to be so simple! Thank you so much, Brandon!
b

brandonmcansh

03/18/2024, 1:33 PM
Of course. Had to recently fix it from a design review so was fresh :)
i

Ian Lake

03/18/2024, 2:01 PM
Note that both Material and Material3 bottom sheets recently changed their defaults to use tween, so if you're on the latest alphas, you wouldn't need to set anything at all: https://developer.android.com/jetpack/androidx/releases/compose-material#1.7.0-alpha03 https://developer.android.com/jetpack/androidx/releases/compose-material3#1.3.0-alpha02
p

Pavel Shnyakin

03/18/2024, 2:03 PM
Thank you, Ian!
2 Views