title: How to set elevation color below the view in Android?
body: <p>I am creating below design in Android Studio. But I stuck in how I can add color in elevation as seen in the picture below. A greenish color is shown below each button. I don't know how I can achieve this. </p>
  
  <p><a href="https://i.stack.imgur.com/V1UfN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V1UfN.png" alt="design to achieve"></a></p>
  
  <p>I have even set the </p>
  
  <blockquote>
    <p>android:outlineSpotShadowColor</p>
  </blockquote>
  
  <p>and also this</p>
  
  <blockquote>
    <p>android:outlineAmbientShadowColor</p>
  </blockquote>
  
  <p>But still, I did not achieve what I was trying to achieve.</p>
  
  <p>This is my XML for the layout in case you need it.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 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=".views.CreateActivity"&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="60dp"
          android:elevation="5dp"
          android:background="@drawable/white"
          android:id="@id/rel1"&gt;
  
          &lt;ImageView
              android:layout_width="50dp"
              android:layout_height="40dp"
              android:layout_centerVertical="true"
              android:src="@drawable/ic_back"
              android:id="@+id/backBut"
  
              /&gt;
  
          &lt;TextView
              android:id="@+id/textView4"
  
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:fontFamily="@font/roboto_bold"
              android:text="CREATE"
              android:textColor="#000"
              android:textSize="20sp" /&gt;
  
  
      &lt;/RelativeLayout&gt;
  
  
      &lt;android.support.v7.widget.CardView
          android:layout_width="match_parent"
          android:layout_height="130dp"
          android:layout_below="@id/rel1"
          android:layout_marginTop="20dp"
          android:layout_marginStart="30dp"
          android:layout_marginEnd="30dp"
          app:cardCornerRadius="15dp"
          app:cardElevation="5dp"
          android:id="@+id/createSingleDealBut"
          &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:layout_margin="5dp"
              android:weightSum="1"
              &gt;
  
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.3"
                  &gt;
                  &lt;ImageView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_centerInParent="true"
                      android:src="@drawable/hourglass"
                      android:scaleType="centerInside"
                      android:layout_margin="20dp"
                      /&gt;
  
              &lt;/RelativeLayout&gt;
              &lt;LinearLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.6"
                  android:orientation="vertical"&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:fontFamily="@font/roboto_medium"
                      android:layout_marginTop="20dp"
                      android:text="Single Deal"
                      android:textColor="#000"
                      android:textSize="18sp"
                      /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:fontFamily="@font/roboto_medium"
                      android:textSize="12sp"
                      android:layout_marginTop="8dp"
                      android:text="Time sensitive exclusive deal expiring live within 24hrs or less"
                      /&gt;
  
  
              &lt;/LinearLayout&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.1"
                  &gt;
                  &lt;ImageView
                      android:layout_width="20dp"
                      android:layout_height="20dp"
                      android:layout_marginTop="20dp"
                      android:src="@drawable/arrow"
                      android:layout_centerHorizontal="true"
  
                      /&gt;
  
              &lt;/RelativeLayout&gt;
  
  
          &lt;/LinearLayout&gt;
  
  
  
  
      &lt;/android.support.v7.widget.CardView&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="OR"
          android:layout_below="@id/createSingleDealBut"
          android:layout_marginTop="30dp"
          android:layout_centerHorizontal="true"
          android:textColor="#000"
          android:textSize="20sp"
          android:fontFamily="@font/roboto_medium"
          android:id="@+id/or"
          /&gt;
  
  
      &lt;android.support.v7.widget.CardView
          android:layout_width="match_parent"
          android:layout_height="130dp"
          android:layout_below="@id/or"
          android:layout_marginTop="20dp"
          android:layout_marginStart="30dp"
          android:layout_marginEnd="30dp"
          app:cardCornerRadius="15dp"
          app:cardElevation="5dp"
          android:id="@+id/createOngoingDealBut"
  
  
          &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:layout_margin="5dp"
              android:weightSum="1"
              &gt;
  
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.3"
                  &gt;
                  &lt;ImageView
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_centerInParent="true"
                      android:src="@drawable/clock"
                      android:scaleType="centerInside"
                      android:layout_margin="15dp"
                      /&gt;
  
              &lt;/RelativeLayout&gt;
              &lt;LinearLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.6"
                  android:orientation="vertical"&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:fontFamily="@font/roboto_medium"
                      android:layout_marginTop="20dp"
                      android:text="Ongoing Deals List"
                      android:textColor="#000"
                      android:textSize="18sp"
                      /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:fontFamily="@font/roboto_medium"
                      android:textSize="12sp"
                      android:layout_marginTop="8dp"
                      android:text="Ongoing daily/weekly time specific deal specials offered to all customers. Create a Happy Hour deals  menu"
                      /&gt;
  
  
              &lt;/LinearLayout&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.1"
                  &gt;
                  &lt;ImageView
                      android:layout_width="20dp"
                      android:layout_height="20dp"
                      android:layout_marginTop="20dp"
                      android:src="@drawable/arrow"
                      android:layout_centerHorizontal="true"
  
                      /&gt;
  
              &lt;/RelativeLayout&gt;
  
  
          &lt;/LinearLayout&gt;
  
  
  
  
      &lt;/android.support.v7.widget.CardView&gt;
  
      &lt;include layout="@layout/bottom_navigation" android:id="@+id/navigation" /&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And the preview for the above XML is </p>
  
  <p><a href="https://i.stack.imgur.com/Curpo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Curpo.png" alt="design achieved so far"></a></p>
  
  <p>Help me to add a greenish color in elevation. Any help will be appreciated.
  Thanks.</p>