title: How to hide textview when image view collapsed completely
body: <p>I have an image view, <code>height-264dp</code> and a text view in collapsible layout, when user scrolls up, image view starts going up, and at certain point it stops, and toolbar takes its place, the issue is that I want to remove textview when collapsible header scrolls up and toolbar comes in place.</p>
  
  <p>This is my view, background blue color will be replace by some image. </p>
  
  <p><a href="https://i.stack.imgur.com/8E4Fs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8E4Fs.png" alt="enter image description here"></a></p>
  
  <p>and when user scrolls up, i need this type of view, background color will be replaced by some image, the part of image will always be visible.</p>
  
  <p><a href="https://i.stack.imgur.com/Yb3O7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yb3O7.png" alt="enter image description here"></a></p>
  
  <p>This is my code, its collapsing fine, the only issue I am facing is that I am unable to hide textview, if it goes away, I am good. </p>
  
  <pre><code>&lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appBarLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@null"
          android:fitsSystemWindows="true"&gt;
  
  
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/collapsing_toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:layout_scrollFlags="scroll|exitUntilCollapsed"
              android:fitsSystemWindows="true"&gt;
  
              &lt;ImageView
                  android:id="@+id/iv_newsViewThumbnail"
                  android:layout_width="wrap_content"
                  android:layout_height="264dp"
                  android:background="@drawable/event_home_bg"
                  android:scaleType="centerCrop"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent" /&gt;
  
  
  
              &lt;TextView
                  android:id="@+id/newsTitle"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginStart="16dp"
                  android:layout_marginEnd="60dp"
                  android:layout_marginBottom="32dp"
                  android:fontFamily="@font/barlow_extrabold"
                  android:shadowColor="#000000"
                  android:shadowRadius="2"
                  app:layout_collapseMode="parallax"
                  android:text="This is a text VIEW That iwant to hide"
                  android:textAllCaps="true"
                  android:textColor="@color/white"
                  android:layout_gravity="bottom"
                  app:layout_scrollFlags="enterAlways"
                  android:textSize="24dp" /&gt;
  
              &lt;android.support.v7.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="70dp"
                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                  app:layout_collapseMode="pin"
                  app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
                  &gt;
  
  
                  &lt;TextView
                      android:id="@+id/tvHome"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginStart="16dp"
                      android:layout_marginTop="16dp"
                      android:fontFamily="@font/barlow_bold"
                      android:letterSpacing="0.1"
                      android:text="HOME"
                      android:textColor="@color/white"
                      android:textSize="17dp"
                      android:textStyle="bold"
                      app:layout_constraintStart_toStartOf="parent"
                      app:layout_constraintTop_toTopOf="parent" /&gt;
  
              &lt;/android.support.v7.widget.Toolbar&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:fillViewport="true"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"
          &gt;
  
          &lt;include layout="@layout/content_webview"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              /&gt;
  
      &lt;/android.support.v4.widget.NestedScrollView&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>