I'm trying to make this bottom sheet only expand to the bottom of another view but haven't been able to figure it out. I'd like the locations_list_sheet
to expand to the bottom of view1
.
I've tried setting the offset, bottomSheet.setExpandedOffset(48)
but no luck with that. I've also tried setting a margin to the top of the bottom sheet layout, but that didn't look right either.
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@android:color/transparent" />
<include
android:id="@+id/map_content"
layout="@layout/content_locations_stoneco" />
<include
android:id="@+id/locations_list_content"
layout="@layout/bottom_sheet_locations" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>