<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@id/materialviewpager_imageHeader"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:scaleType="centerCrop" />
    <View
        android:id="@id/materialviewpager_headerImageDarkLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/black"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@id/materialviewpager_imageHeader"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:scaleType="centerCrop" />
    <View
        android:id="@id/materialviewpager_headerImageDarkLayer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
</RelativeLayout>
Add layer to darken picture and reveal text : - remove layer background color from xml
Add layer to darken picture and reveal text :
- remove layer background color from xml
