title: Android: How can you set the value of a ratingBar within a ListAdapter?
body: <p>I'm trying to figure out how to set the value of a ratingBar that is in a list, but haven't been able to figure it out.</p>
  
  <p>I'm currently using a simple adapter to set the text.</p>
  
  <p>Where <em>mylist</em> is a hashmap.</p>
  
  <pre><code>ListAdapter adapter = new SimpleAdapter(this, mylist , R.layout.list_simple, 
                              new String[] { "name"}, 
                              new int[] { R.id.item_title});
  
  setListAdapter(adapter);
  </code></pre>
  
  <p>And my xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:padding="10dp"
      android:background="@color/white"&gt;
  
  
      &lt;TextView  
      style="@style/ListHeading"
      android:id="@+id/item_title"
      android:gravity="left"/&gt;
  
      &lt;RatingBar 
      style="@style/RatingBarSm" 
      android:id="@+id/ratingBar" 
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:isIndicator="true"/&gt;         
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>When I try to add "rating" to the simple adapter, I get this error.</p>
  
  <pre><code>ERROR/AndroidRuntime(10793): java.lang.IllegalStateException: android.widget.RatingBar is not a  view that can be bounds by this SimpleAdapter
  </code></pre>
  
  <p>I haven't been able to find anything useful on this. Any help or direction is greatly appreciated.</p>