0

I have a bottom sheet and I want to achieve the following image

enter image description here

right now it looks flat like:

enter image description here

So how could I add a top shadow on a bottom sheet, that slides. In bottom sheet I have a linear layout for the backdrop for example something like:

    <!--This is the backdrop's content with a BottomSheetBehaviour applied to it-->
    <LinearLayout
        android:id="@+id/contentLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:behavior_peekHeight="356dp"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

        <!--This is the backdrop's header with a title and icon-->

        <RelativeLayout
            android:layout_width="match_parent"
            android:background="@drawable/front_backdrop_top"
            android:layout_height="90dp">

        </RelativeLayout>

        <!--And finally this is the body of the backdrop's content-->
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:elevation="8dp"
            app:elevation = "8dp"
            android:background="@drawable/fron_backdrop_main"
            android:paddingStart="28dp">

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/fs_rv_search"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />

                </LinearLayout>

            </androidx.core.widget.NestedScrollView>

        </RelativeLayout>

    </LinearLayout>
F.Mysir
  • 2,838
  • 28
  • 39

0 Answers0