Using Layer Lists In android To create a stunning UI.

34 sec read

Dear Developer

There are various Shape Drawables in Android.

  1. Shape Drawable
  2. Layer List
  3. Selector


For Shape Drawable we have a blog post : Link


For Selector Drawable we have a blog post : Link


For Layer Lists we are going to develop in this blog.

Expected output :


<layer-list xmlns:android="">
        <shape android:shape="rectangle" >
            <solid android:color="#e60b0b" />
            <corners android:radius="10dp" />
    <item android:left="2dp" android:right="2dp" android:top="2dp" android:bottom="2dp">
        <shape android:shape="rectangle" >
            <solid android:color="#000" />
            <corners android:radius="10dp" />


Now use the layer list xml file as a background for your UI widget. and you can also build that stunning UI.


Thanks for reading.


Happy Coding.