title: How to make a collapsing toolbar in android?
body: <p>so im trying to implement a simple collapsing toolbar, but I don't think my xml layout is correct. The text is appearing the image and when I scroll down, I can't scroll back up to see the image. Hope you guys can help!</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:ignore="RtlHardcoded"&gt;
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/cardInfo_appbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/cardInfo_collapsing"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"&gt;
              &lt;ImageView
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:src="@drawable/image_kyoto"/&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="wrap_content"&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Hello there"
                  android:textSize="30dp"/&gt;
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Hello there"
                  android:textSize="30dp"/&gt;
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:text="Hello there"
                  android:textSize="30dp"/&gt;        &lt;TextView
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:text="Hello there"
              android:textSize="30dp"/&gt;
          &lt;/LinearLayout&gt;
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>Here's the image
  <a href="https://i.stack.imgur.com/7lRSW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7lRSW.png" alt="enter image description here"></a></p>