I had the same problem that I had a little hack, but I made it work like that.
Essentially, a transparent linear layout with a bottom sheet is simply made, and then we place the view in it. Then a transparent lower bottom bottom is given.
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="20dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:transitionName="vatom"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:elevation="300dp"
android:paddingBottom="20dp"
android:paddingTop="20dp"
>
<View
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/colorAccent"
/>
</LinearLayout>
source
share