title: How to setup collapsing toolbar in bottom sheet?
body: <p>I want to set up a collapsing toolbar in my bottomsheet xml, but it seems that the collapsing toolbar won't collapse when the bottomsheet is expanded. Any way to make it collapse when bootomsheet is expanded? Here is my code:</p>
  
  <pre><code>    &lt;com.google.android.material.appbar.AppBarLayout
          android:id="@+id/app_bar_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;com.google.android.material.appbar.CollapsingToolbarLayout
              android:id="@+id/toolbar_layout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              app:contentScrim="?attr/colorPrimary"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
              &lt;ImageView
                  android:id="@+id/expandedImage"
                  android:layout_width="match_parent"
                  android:layout_height="200dp"
                  android:scaleType="centerCrop"
                  android:src="@drawable/photo"
                  app:layout_collapseMode="parallax"
                  app:layout_collapseParallaxMultiplier="0.7" /&gt;
  
  
              &lt;androidx.appcompat.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  app:layout_collapseMode="pin"
                  app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
          &lt;/com.google.android.material.appbar.CollapsingToolbarLayout&gt;
  
      &lt;/com.google.android.material.appbar.AppBarLayout&gt;
  
  </code></pre>