I am wanting to implement a "Bottom Sheet" type of layout, but with a twist where the "bottom" sheet will be a MapFragment, which won't work very well as an up/down draggable view.
I had a probably naive thought to "flip" the logic to a "Top Sheet" design, where you drag the Top Sheet up/down to show more/less of the bottom MapFragment.
ie: From this...
...to [something like] this...
Is this possible given the Support Design Tools, or will I have to roll something like this on my own?
I found a TopSheetBehavior
implementation and have tried to keep it up-to-date: https://github.com/carlos-mg89/TopSheetBehavior
It has proved to work pretty well in my case. I found many other TopSheetBehavior
that were incomplete or that crashed, but this one doesn't crash and works out of the box by only replacing the behavior parameter:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:behavior_hideable="true"
app:behavior_peekHeight="56dp"
app:layout_behavior="your.package.components.TopSheetBehavior">
<!-- Your content goes here -->
</LinearLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With