Bottom Sheet перекрывается кнопкой
xml активности на картинке
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".main.ButtonMainActivity">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="80dp"
android:background="@drawable/ic_check_circle_black_150dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Switch
android:id="@+id/switch3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:text="Товар"
android:textSize="18sp"
app:layout_constraintEnd_toStartOf="@+id/switch3"
app:layout_constraintTop_toBottomOf="@+id/button" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:text="Купон"
android:textSize="18sp"
app:layout_constraintStart_toEndOf="@+id/switch3"
app:layout_constraintTop_toBottomOf="@+id/button" />
<!-- Adding bottom sheet after main content -->
<include layout="@layout/bottom_sheet" />
</androidx.constraintlayout.widget.ConstraintLayout>
bottom_sheet.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".TestActivity">
<androidx.core.widget.NestedScrollView
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorNull"
app:behavior_hideable="false"
app:behavior_peekHeight="20dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorNull"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="10dp"
app:srcCompat="@android:drawable/button_onoff_indicator_on" />
<ImageView
android:layout_width="match_parent"
android:layout_height="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/layout_bg"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Меню"
android:textColor="@color/colorBlack"
android:textSize="40sp" />
<Button
android:id="@+id/to_button_activity"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:text="Главная"
android:textSize="20sp" />
<Button
android:id="@+id/to_profile_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Профиль"
android:textSize="20sp" />
<Button
android:id="@+id/to_coupon_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Мои купоны"
android:textSize="20sp" />
<Button
android:id="@+id/to_prize_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Мои призы"
android:textSize="20sp" />
<Button
android:id="@+id/to_exchange_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Обменять"
android:textSize="20sp" />
<Button
android:id="@+id/to_settings_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Настройки"
android:textSize="20sp" />
<Button
android:id="@+id/to_quit_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:textColor="@color/colorGrey"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="Выйти"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
