How do I bind data to the attributes of a progress bar?
<p>I'm building an app that has a ListActivity and the view for each item has a progress bar. I've been able to bind my data to the TextView, but I can't seem to figure out how to bind it to the max and progress of the ProgressBar.  </p>

<p>This is a simplified version of my view:</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
&gt;
&lt;TextView android:id="@+id/text1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:layout_alignParentLeft="true"/&gt;
&lt;ProgressBar android:id="@+id/progress_bar"
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/text1"
    /&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p>and I'm using the same method as the Notepad tutorials to put my data into the views:  </p>

<pre><code>String[] from = new String[]{MyDbAdapter.KEY_AMOUNT};
int[] to = new int[]{R.id.text1};
SimpleCursorAdapter list_adapter = 
    new SimpleCursorAdapter(this, R.layout.item_row, myCursor, from, to);
setListAdapter(list_adapter);
</code></pre>

<p>Adding MyDbAdapter.KEY_AMOUNT and R.id.progress_bar to the arrays throws an exception (java.lang.IllegalStateException: android.widget.ProgressBar is not a  view that can be bounds by this SimpleCursorAdapter). Is there some kind of @... that I need to use for max and progress to make this work?</p>
