Android Listview with linear straight progressbars
<p>I'm new to android and now trying to make a small project.
It includes a <code>listview</code> with <code>textviews</code> and a linear <code>progressbar</code> (its value doesn't need to change).
<code>Simple Adapter</code> was used to fill data to <code>textviews</code>.
But to set <code>progressbar</code> value, which adapter should be used.
I can't image how to set value to <code>progressbar</code>.
Please help with this.</p>

<p>Here is my code: </p>

<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"&gt;

&lt;ListView
    android:id="@+id/dblist"
    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><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;!--  ListRow Left sied Thumbnail image --&gt;
&lt;LinearLayout android:id="@+id/thumbnail" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="3dip"      
            android:layout_alignParentLeft="true"
            android:background="@drawable/image_bg" 
        android:layout_marginRight="5dip"&gt;

    &lt;ImageView     
        android:id="@+id/list_image"   
        android:layout_width="50dip"
        android:layout_height="50dip"
        android:src="@drawable/ic_launcher"/&gt;

&lt;/LinearLayout&gt;

&lt;!-- Title Of Song--&gt;
&lt;TextView
    android:id="@+id/col1tv"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/thumbnail"
    android:layout_toRightOf="@+id/thumbnail"
    android:text="Rihanna Love the way lie"
    android:textColor="#040404"
    android:typeface="sans" 
    android:textSize="15dip"
    android:textStyle="bold"/&gt;

&lt;!-- Artist Name --&gt;
&lt;TextView
    android:id="@+id/col2tv"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/col1tv"
    android:textColor="#343434"
    android:textSize="10dip"
    android:layout_marginTop="1dip"
    android:layout_toRightOf="@+id/thumbnail"
    android:text="Just gona stand there and ..." /&gt;

&lt;TextView 
    android:id="@+id/package_id"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:visibility="gone"/&gt;

&lt;TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/col1tv"
    android:textColor="#343434"
    android:textSize="10dip"
    android:layout_marginTop="1dip"
    android:layout_toRightOf="@+id/col2tv"
    android:text=" puzzles, 0 solved" /&gt;

&lt;!-- Rightend Duration --&gt;


 &lt;!-- Rightend Arrow --&gt;    
 &lt;ImageView android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/arrow"
    android:layout_alignParentRight="true"
    android:layout_centerVertical="true"/&gt;

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

<p><strong>main.java</strong></p>

<pre><code>    String[] from = new String[] {"pkg_id", "pkg_name_en", "pkg_size"};
    int[] to = new int[] { R.id.an_pkg_id, R.id.an_pkg_name, R.id.an_pkg_size };

    // prepare the list of all records
    List&lt;HashMap&lt;String, String&gt;&gt; fillMaps = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
    for (int i = 0; i &lt; pkg_id_col.size(); i++) {
         HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
         map.put("pkg_id", pkg_id_col.get(i));
         map.put("pkg_name_en", pkg_name_en_col.get(i));
         map.put("pkg_size", pkg_size_col.get(i));

         fillMaps.add(map);
     }

    SimpleAdapter adapter = new SimpleAdapter(this, fillMaps, R.layout.list_row_add_new, from, to);
    lv_add_new.setAdapter(adapter);
</code></pre>
