I found here how to create a shadow for a button.
Here's what I would like to do :
And here's what I succeeded to do so far :
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item android:right="10dp" android:top="10dp">
<shape>
<corners android:radius="3dp" />
<solid android:color="#D6D6D6" />
</shape>
</item>
<item android:bottom="2dp" android:left="2dp">
<shape>
<solid android:color="@color/mainBlue"/>
<corners android:radius="12dp" />
<padding android:bottom="10dp" android:left="10dp"
android:right="10dp" android:top="10dp" />
</shape>
</item>
</layer-list>
</item>
</selector>
Obviously the shadow is completely different, and if you notice, it is kind of cutten in the bottom left corner and we don't see the radius. In my design software, I specified an angle, a distance, a spread and a size for the shadow. How may I control these parameters in XML so that I can faithfully reproduce the same shadow ?
EDIT : what I ended up doing is to export my design as a png file as I didn't find any way to reproduce the shadow with code :/