I've been having a lot of trouble with this layout.
Basically I have 2 linears, one that is slightly grey with that shadow on bottom and below another linear just white. My trouble here is adding that shadow to the end of the first linear. I tried "elevation" but that is now what i need since i want the shadow to be inside the linear kinda if the last 10dp are from a different color but I'm not getting it right.
This is my layout so far, i thought of putting a view inside the first linear but its not working that good.
Any ideas how to do this?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:background="#f8f8f8"
        android:layout_height="0dp">
        <android.support.v7.widget.CardView
            app:cardCornerRadius="10dp"
            app:cardElevation="10dp"
            android:layout_width="312dp"
            android:layout_height="204dp"
            app:cardBackgroundColor="@android:color/holo_red_light"/> 
    </LinearLayout>
    <LinearLayout
        android:background="#ffffff"
        android:layout_weight="1"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="0dp">
    </LinearLayout>
</LinearLayout>

 
     
     
    
