title: FloatingActionButton doesn't hide
body: <p>I am trying to hide my FloatingActionButton <code>fabLocation</code> programmatically with :</p>
  
  <pre><code>fabLocation.setVisibility(View.GONE)
  </code></pre>
  
  <p>but it does not work.</p>
  
  <p>If I add <code>android:visibility="gone"</code> in my XML layout, <code>fabLocation</code> is hidden when I run my activity but it reappears when I scroll.</p>
  
  <p>Here is my layout:</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:id="@+id/main_content"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:id="@+id/appbar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:fitsSystemWindows="true"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
      &lt;android.support.design.widget.CollapsingToolbarLayout
          android:id="@+id/collapsing_toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:fitsSystemWindows="true"
          app:contentScrim="@color/colorOverlay"
          app:expandedTitleMarginEnd="64dp"
          app:expandedTitleMarginStart="48dp"
          app:layout_scrollFlags="scroll|exitUntilCollapsed"&gt;
  
          &lt;ImageView
              android:id="@+id/img_couverture"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              android:scaleType="centerCrop"
              android:src="@drawable/bg_navigation_drawer_header"
              app:layout_collapseMode="parallax" /&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_collapseMode="pin"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;
  
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  &lt;android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;android.support.v7.widget.CardView
              android:layout_marginTop="8dp"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"
                  android:padding="16dp"&gt;
  
                  &lt;TextView
                      android:id="@+id/tv_name"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textSize="18sp" /&gt;
  
                  &lt;View
                      android:background="@drawable/separator_orange_gradient"
                      android:layout_marginTop="8dp"
                      android:layout_marginBottom="16dp"
                      android:layout_width="match_parent"
                      android:layout_height="2dp"/&gt;
  
                  &lt;TextView
                      android:id="@+id/tv_history"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:textAppearance="@style/TextAppearance.RobotoLight" /&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  
  &lt;android.support.design.widget.FloatingActionButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_margin="16dp"
      android:clickable="true"
      android:id="@+id/fab_location"
      android:src="@drawable/ic_fab_location_24dp"
      app:backgroundTint="@color/colorOrange"
      app:layout_anchor="@id/appbar"
      app:layout_anchorGravity="bottom|right|end" /&gt;
  </code></pre>
  
  <p></p>