title: Android bottom sheet
body: <p>I have an activity that includes a fragment, inside it I have a map using google maps api, and I want to add a bottom sheet which should automatically move up my location floating button until it reach a medium height.</p>
  
  <p>Here is my fragment:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;android.support.v4.widget.DrawerLayout
      android:layout_height="match_parent"
      android:layout_width="match_parent"&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;android.support.design.widget.CoordinatorLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
              &lt;com.google.android.gms.maps.MapView
                  android:id="@+id/mapView"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent" /&gt;
  
              &lt;android.support.design.widget.FloatingActionButton
                  android:id="@+id/my_location_btn"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="16dp"
                  android:layout_marginRight="16dp"
                  android:layout_marginBottom="66dp"
                  app:backgroundTint="#ffffff"
                  app:elevation="6dp"
                  app:layout_anchor="@id/mapView"
                  app:layout_anchorGravity="bottom|right|end"
                  app:pressedTranslationZ="12dp"
                  app:srcCompat="@drawable/ic_my_location_black_24dp" /&gt;
          &lt;/android.support.design.widget.CoordinatorLayout&gt;
      &lt;/FrameLayout&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  
  &lt;android.support.v4.widget.NestedScrollView
      android:id="@+id/bottom_sheet"
      android:layout_width="match_parent"
      android:layout_height="350dp"
      android:background="@android:color/holo_blue_light"
      app:behavior_hideable="false"
      app:behavior_peekHeight="55dp"
      android:clipToPadding="true"
      app:layout_behavior="@string/bottom_sheet_behavior"&gt;
  
      &lt;FrameLayout
          android:id="@+id/job_frame"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          android:layout_marginBottom="2dp" /&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to archive something like that, look at the my location button:</p>
  
  <p><a href="https://www.youtube.com/watch?v=iwpR_uzqTq4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=iwpR_uzqTq4</a></p>