title: Android slide up bottom sheet from dragging main content layout
body: <p>I use persistent <code>bottom sheet</code> view in <code>coordinatorLayout</code>. my layout:</p>
  
  <pre><code>&lt;androidx.coordinatorlayout.widget.CoordinatorLayout
      android:id="@+id/coordinatorLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;!-- main content --&gt;
      &lt;RelativeLayout
          android:id="@+id/mainContentLayout"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;!-- i need Dragging this layout to slide up bottom sheet --&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;!-- persistent bottom sheet --&gt;
      &lt;androidx.appcompat.widget.LinearLayoutCompat
          android:id="@+id/bottomSheet"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          app:layout_behavior="@string/bottom_sheet_behavior"
          app:behavior_hideable="false"
          app:behavior_peekHeight="70dp"&gt;
  
          &lt;!-- content bottom sheet (recyclerview or ...) --&gt;
  
      &lt;/androidx.appcompat.widget.LinearLayoutCompat&gt;
  
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>and register bottom sheet view:</p>
  
  <pre><code>BottomSheetBehavior bottomSheetBehavior;
  View bottomSheet = findViewById(R.id.bottomSheet);
  bottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
  bottomSheetBehavior.setHideable(false);
  </code></pre>
  
  <p>now, in addition to slide through bottom <code>R.id.bottomSheet</code>, I also need dragging main content <code>R.id.mainContentLayout</code> to slide up bottomSheet.</p>
  
  <p>How to add this feature?</p>
  
  <p><a href="https://i.stack.imgur.com/XxbH1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XxbH1.jpg" alt="enter image description here"></a></p>