This type of effect is well used in Material Design . It is based on CardView
and / or RecyclerView
.
I'll show you how easy it is to do this kind of effect.
drawable / layout_shadow_white.xml
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#CABBBBBB"/>
<corners android:radius="5dp" />
</shape>
</item>
<item
android:left="0dp"
android:right="0dp"
android:top="0dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
<corners android:radius="5dp" />
</shape>
</item>
</layer-list>
layout / my_layout.xml
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:layout_below="@+id/relativeLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="-20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/layout_shadow_white"
android:id="@+id/rel_anything"></RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:background="@drawable/layout_shadow_white"
android:layout_below="@+id/rel_newgame"
android:layout_centerHorizontal="true"
android:id="@+id/rel_anything2"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="80dp"
android:background="@drawable/layout_shadow_white"
android:id="@+id/rel_editor"
android:layout_below="@+id/rel_culpado"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
Usage: android:background="@drawable/layout_shadow_white"
Result