Note that there are some explanatory texts on larger screens.

plurals
  1. PORounded corner list view in android
    primarykey
    data
    text
    <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>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload