Rounded corner list view in android
<p>I have a problem that I want to create a list view with rounded corners but I failed to achieve the same. Please suggest me for the right solution. </p>

<p><strong>CustomShape XML:</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;

&lt;item&gt;
      &lt;shape&gt;
            &lt;stroke android:width="1dp" android:color="#ffbbbbbb" /&gt;
            &lt;corners android:topLeftRadius="20dp"
        android:topRightRadius="20dp"
         /&gt;
      &lt;/shape&gt;
&lt;/item&gt;
&lt;item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp"&gt;
     &lt;shape &gt;
           &lt;solid android:color="#ffffffff" /&gt;
          &lt;corners android:topLeftRadius="20dp"
        android:topRightRadius="20dp"
         /&gt;
     &lt;/shape&gt;
&lt;/item&gt;

&lt;/layer-list&gt;
</code></pre>

<p><strong>main XML:</strong></p>

<pre><code>&lt;LinearLayout android:orientation="vertical"

        android:layout_width="fill_parent" android:layout_height="wrap_content"
        android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
        android:layout_marginBottom="10dp" android:layout_marginTop="120dip"&gt;

        &lt;ListView android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:id="@+id/lv_homeScreen" android:cacheColorHint="@color/WHITE" android:dividerHeight="0dp" android:background="@drawable/customshape"&gt;

        &lt;/ListView&gt;


    &lt;/LinearLayout&gt;
</code></pre>

<p>I have attached the code which I am using for the same desire. Please have a look and share me if there are any flaws.</p>

<p>Thanks in advance.</p>
