0

I want this kind of bottom sheet which should be above the ScrollView.

enter image description here

The images in the scroll view should be behind the bottom sheet. the bottom sheet should always be there on the screen till the proceed button on it is clicked. Any help will be appreciated. Thanks !!

David
  • 15,894
  • 22
  • 55
  • 66

2 Answers2

0

If the bottom sheet/panel is always there, theres no need to overlap those panels check this simplified xml layout example:

<?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>
Rogério Peixoto
  • 2,176
  • 2
  • 23
  • 31
-1

Let's see the code

<?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>
V-rund Puro-hit
  • 5,518
  • 9
  • 31
  • 50
Ramesh
  • 1,772
  • 4
  • 12
  • 15