I want a shape on the background of the layout, as shown below. I tried something that is given below.
borders.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <solid android:color="#10CCCCCC" /> <padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> </shape> </item> <item> <shape> <solid android:color="#20CCCCCC" /> <padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> </shape> </item> <item> <shape> <solid android:color="#40CCCCCC" /> <padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> </shape> </item> <item> <shape> <solid android:color="#50CCCCCC" /> <padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> </shape> </item> <item> <shape> <solid android:color="#60CCCCCC" /> <padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> </shape> </item> <item> <shape> <solid android:color="#ffffff" /> </shape> </item> </layer-list>
And the layout set as
android:background="@drawable/borders"
Thanks to this implementation, I get this

How can I get a shadow with rounded corners as shown below?

android shape
Mayur raval
source share