title: How to stop scrolling toolbar in coordinatorlayout
body: <p>I am making a simple app. I use CoordinatorLayout and AppbarLayout, AppbarLayout contains two Toolbar. </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"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".MainActivity"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar1"
          android:layout_width="match_parent"
          android:layout_height="?attr/actionBarSize"
          app:layout_scrollFlags="scroll|enterAlways"
          &gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:orientation="horizontal"
              android:layout_height="wrap_content"&gt;
              &lt;Button
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="hi"/&gt;
          &lt;/LinearLayout&gt;
  
      &lt;/android.support.v7.widget.Toolbar&gt;
  
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar2"
          android:layout_width="match_parent"
          android:visibility="gone"
          app:layout_collapseMode="pin"
          android:layout_height="wrap_content"&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="sign"/&gt;
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="hil"
              /&gt;
          &lt;/LinearLayout&gt;
      &lt;/android.support.v7.widget.Toolbar&gt;
  
     &lt;/android.support.design.widget.AppBarLayout&gt;
  &lt;android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="call"/&gt;
  
  
  &lt;/android.support.v4.widget.NestedScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>public void call(View view) {
  Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar1);
  Toolbar toolbar2=(Toolbar)findViewById(R.id.toolbar2);
  toolbar.setVisibility(View.GONE);
  toolbar2.setVisibility(View.VISIBLE);
  </code></pre>
  
  <p>}</p>
  
  <p>In normal, the First toolbar will scroll, but When I click on the button in NestedScrollView. The second toolbar should show, toolbar must pin at the top don't want to scroll. </p>
  
  <p>What to do? </p>