滚动视图上方的底部 sheet

Bottom sheet above the scrollView

我想要这种底部 sheet 它应该在 ScrollView 之上。

滚动视图中的图像应该在底部后面sheet。底部 sheet 应始终显示在屏幕上,直到单击其上的继续按钮。任何帮助将不胜感激。谢谢!!

如果底部 sheet/panel 始终存在,则无需重叠这些面板检查此简化的 xml 布局示例:

<?xml version="1.0" encoding="utf-8"?>
<!-- This is your root layout element -->
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:android_width="match_parent"
  android:android_height="0dp"
  android:layout_weight="4">

  <ScrollView
    android:android_width="match_parent"
    android:android_height="0dp">
    <!-- Put your inner grid layout here -->
  </ScrollView>


  <!-- this is your bottom panel layout -->
  <!-- you can control the size of your bottom -->
  <!--  pane by playing with the layout weights  -->
  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1">

    <Button
      android:text="Proceed"
      android:background="@drawable/yourSelectorXml"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"/>
  </LinearLayout>

 </LinearLayout>

来看代码

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:android_width="match_parent"
    android:android_height="0dp"
    android:layout_weight="4">

    <ScrollView
        android:android_width="match_parent"
        android:android_height="0dp">
        <!-- Put your inner grid layout here -->
    </ScrollView>

    <!-- put your bottom panel layout here -->

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <Button
            android:text="Proceed"
            android:background="@drawable/yourSelectorXml"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </LinearLayout>
</LinearLayout>