I would like to make an XMl drawable file that resembles as closely as possible to the material design elevation found on Lollipop and above. I currently have a shadow that does not even come close as I have no idea what gradient I'm suppose to use.
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<gradient android:angle="90"
android:endColor="@android:color/darker_gray"
android:startColor="#ccc" />
<corners android:radius="0.1dp"
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp"/>
</shape>
</item>
<item
android:left="1.5dp"
android:right="1.5dp"
android:top="1.5dp"
android:bottom="1.5dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners
android:radius="0.1dp"
android:bottomLeftRadius="3dp"
android:bottomRightRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp" />
</shape>
</item>
</layer-list>
Can someone come up with a solution that is at least better than mine? Thank you.