Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As per your requirement </p> <p>create a shape file in your drawable folder .Put this xml in it and change the color as per your requirement .</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/shape_my"&gt; &lt;stroke android:width="4dp" android:color="#636161" /&gt; &lt;padding android:left="5dp" android:top="5dp" android:right="5dp" android:bottom="5dp" /&gt; &lt;corners android:radius="24dp" /&gt; &lt;solid android:color="#FFF" /&gt; &lt;/shape&gt; </code></pre> <p><strong>main.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"&gt; &lt;ListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:divider="#b5b5b5" android:dividerHeight="1dp" android:listSelector="@drawable/list_selector" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>In the ListView set the background <code>android:background="@drawable/shape"</code></p> <p><strong>list_row.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/list_selector" android:orientation="horizontal" android:padding="5dip" &gt; &lt;TextView android:id="@+id/category" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Category" android:textColor="#040404" android:textSize="15dip" android:textStyle="bold" android:typeface="sans" /&gt; &lt;TextView android:id="@+id/expiry_date" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/category" android:layout_marginTop="1dip" android:text="Text here." android:textColor="#343434" android:textSize="10dip" /&gt; &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:src="@drawable/arrow" /&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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