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

brandonmcansh

07/27/2020, 3:36 PM
Above snippet is the drawerContent in the BottomDrawerLayout)
m

matvei

07/27/2020, 3:41 PM
BottomDrawerLayout
is the only API that can give you similar to what you want experience. We have plans to provide proper
BottomSheet
or
Backdrop
components in the future, but no timeline for this. What you can do in the meantime is to take a look at the internals of
BottomDrawer
, copypaste it and tweak as you like. It will be way easier than in current android, as
BottomDrawerLayout
is just few building blocks assembled together and not a gigantic everything-in-one component
b

brandonmcansh

07/27/2020, 3:42 PM
gotcha; yeah this gets me desired effect that I had in MDC prior. Thanks @matvei I appreciate the look over
m

matvei

07/27/2020, 3:43 PM
"optimized way" part of answer: What you see in Drawers is the way to go and it's an optimised version, as we use
Modifier.offsetPx
there that accepts
State<Float>
to perform only relayout when user is dragging the sheet, and no recomposition or remeasure
b

brandonmcansh

07/27/2020, 3:45 PM
perfect
2 Views