https://kotlinlang.org logo
#compose
Title
# compose
c

Cash Hsiao

10/27/2020, 4:53 AM
I'm trying to use
BottomSheetScaffold
to implement bottom sheet behavior. In old
BottomSheetBehavior
we have some middle states like
STATE_DRAGGING
or
STATE_HALF_EXPANDED
, however now the
BottomSheetValue
have only
Collapsed
and
Expanded
. Is there any plan to implement additional states or other ways to deal with the middle states?
m

matvei

10/27/2020, 9:41 AM
Hello.
BottomSheetScaffoldState::BottomSheetState
provide all kind of such information. For example, you can do
bottomSheetState.progress
to get
SwipeProgress
to know where're you going to and from and whether anything is actually happening right now. That being said, we will probably add
InteractionState
to BottomSheetScaffold at some point so you would be able to query for dragging in progress even easier
🙏 1
c

Cash Hsiao

10/27/2020, 9:45 AM
It's good to know there will be additional state for implementation. I don't know I can access
Swipeable
before. I'll try it.
m

matvei

10/27/2020, 9:47 AM
Let me know how it went 🙂
👍 1
m

Manojna Chintapalli

12/20/2021, 11:58 PM
Hello @Cash Hsiao @matvei I have a similar requirement where I need
STATE_HALF_EXPANDED
when using
BottomSheetScaffold
is there a way I can do this? I see that this is possible with
ModalBottomSheet
but my UI requires me to use
BottomSheetScaffold
. Thanks.
4 Views