Join Slack
Powered by
Hello! ModalBottomSheetLayout is jumping on fling ...
# 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?
video.mov.mp4
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
brandonmcansh
03/18/2024, 1:11 PM
Cc
https://github.com/code-payments/code-android-app/commit/9c4d51435e9996decd1e6e4432c1c56e6296fa3d
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!
5
Views
Open in Slack
Previous
Next