I created a background with buttons from the forms and look good for my purpose. The only thing needed is to cast a little shadow for her. Here is the code:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true"> <shape> <solid android:color="#343434" /> <stroke android:width="1dp" android:color="#171717" /> <corners android:radius="3dp" /> <padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" /> </shape> </item> <item> <shape> <gradient android:angle="270" android:endColor="#E2E2E2" android:startColor="#BABABA" /> <stroke android:width="1dp" android:color="#BABABA" /> <corners android:radius="4dp" /> <padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" /> </shape> </item> </selector>
Here is what I want to achieve.

How to cast a shadow? I suppose that I need to make another shape, but with a black / gray background and set some kind of upper left border of the field so that it looks like a shadow. But I donβt know how to do this ... and the documentation didnβt help me much.
Further Edit: I want to add a shadow to the xml file, not the code. Thanks.
Alin
source share