Closed OxygenCobalt closed 1 month ago
Okay, I actually looked closer and it does seem that non-hideable bottom sheets do have a predictive back behavior. Still, the issue where the bottom sheet doesn't seem to correctly scale back remains.
@OxygenCobalt can you provide a video of the issue and code snippets for your setup?
Our Catalog app has a non-hideable bottom sheet which works well with predictive back, so we will have to figure out how your setup is different:
Sorry for the late response @dsn5ft, I lost track of this. It was just a configuration error on my end. Thanks anyway.
Is your feature request related to a problem? Please describe. My app has a bottom sheet that is persistent, i.e
isHideable = false
, the the back button makes it go from expanded to collapsed. However, it seems like the predictive back behavior forBottomSheetBehavior
is hard-coded to hide the bottom sheet, and in general it seems like the animation will only work if the bottom sheet hides when the back button is pressed. If I try it in my own app with my non-hideable bottom sheet, the sheet stays in it's detached/zoomed out state, even when the back operation was complete.Describe the solution you'd like I want some kind of predictive back behavior defined for when a bottom sheet will go from an expanded to collapsed state, rather than simply to a hidden state. This can still fit the current "detatch from the edges" behavior defined in the specification, but the bottom sheet simply reattaches itself to the edges of it's screen as it collapses.
Describe alternatives you've considered Designing my bottom sheets to be modal, which would take a lot of effort and not be very user-friendly.