title: How to add a gradient to a ImageView nested in a CollapsingToolbar
body: <p>I'am working on an Android app with material design. I have a detail view with a CollapsingToolbarLayout and a ImageView (works fine so far). Unfortunately the title is not readable if there is a bright image.
  <a href="https://i.stack.imgur.com/ua0KD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ua0KD.png" alt="screenshot of this issue"></a>
  So far I tried to add a gradient (<a href="https://stackoverflow.com/questions/23991395/add-gradient-to-imageview">Add gradient to imageview</a>) but this solution didn't work for me because of the CollapsingToolbarLayout.
  Here you can see my code:</p>
  
  <pre><code>&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"
  android:fitsSystemWindows="true"&gt;
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_height="256dp"
      android:layout_width="match_parent"
      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"
          app:layout_scrollFlags="scroll|exitUntilCollapsed"
          app:contentScrim="@color/primary"
          android:fitsSystemWindows="true"
          app:expandedTitleMarginEnd="50dp"
          app:expandedTitleMarginStart="50dp"
          &gt;
  
  
          &lt;!--&lt;View
              android:background="@drawable/actionbar_gradient_dark"
          /&gt;--&gt;
              &lt;ImageView
                  android:id="@+id/backimg"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:fitsSystemWindows="true"
                  app:layout_collapseMode="parallax"
                  android:scaleType="centerCrop"
                  app:layout_scrollFlags="scroll|enterAlways"
                  /&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/detailToolbar"
              android:layout_height="?attr/actionBarSize"
              android:layout_width="match_parent"
              app:layout_collapseMode="pin"
              app:layout_collapseParallaxMultiplier="0.7"
              app:layout_scrollFlags="scroll|enterAlways"
              app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/&gt;
  
      &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  </code></pre>
  
  <p>Does anyone know a solution for this issue?</p>