In your XML add this:
android:elevation="2dp"
android:background="@drawable/myrect"
In your Live folder, add this feature:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#42000000" />
<corners android:radius="5dp" />
</shape>
See here for more information: http://developer.android.com/training/material/shadows-clipping.html
source
share