title: Adding RatingBar to ListAdapter using Simple Adapter not working Correctly
body: <p>I have a ListAdapter in my android application... I am trying to add a ratingBar to each item in the list with its value set to a value that is contained in [TAG_RATING]. The problem is that the list is showing and the only ratingBar is being stuck at the very bottom of the list and is rather large. </p>
  
  <p>Please see the below code:</p>
  
  <pre><code>   ListAdapter adapter = new SimpleAdapter(
                          AllProductsActivity.this, productList,
                          R.layout.list_item, new String[] { TAG_BID,
                                  TAG_NAME,
                                  TAG_RATING},
                          new int[] { R.id.pid, R.id.name, R.id.ratingBar});
                      ((SimpleAdapter) adapter).setViewBinder(new MyBinder());
                  // updating listview
                  setListAdapter(adapter);
  </code></pre>
  
  <p>then the ViewBinder class looks like this:</p>
  
  <pre><code>   class MyBinder implements ViewBinder{
      public boolean setViewValue(View view, Object data, String textRepresentation) {
          if(view.getId() == R.id.ratingBar){
              String stringval = (String) data;
              float ratingValue = Float.parseFloat(stringval);
              RatingBar ratingBar = (RatingBar) view;
              ratingBar.setRating(ratingValue);
              return true;
          }
          return false;
      }
  }
  </code></pre>
  
  <p>And the list item xml file looks like this:</p>
  
  <pre><code>   &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical" &gt;
  
  
  &lt;TextView
      android:id="@+id/pid"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:visibility="gone" /&gt;
  
  &lt;!-- Name Label --&gt;
  &lt;TextView
      android:id="@+id/name"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:paddingTop="6dip"
      android:paddingLeft="6dip"
      android:textSize="17dip"
      android:textStyle="bold" /&gt;
  
    &lt;RatingBar
      android:id="@+id/rating"
      style="?android:attr/ratingBarStyleSmall"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:paddingTop="6dip"
      android:stepSize="0.25"
      android:numStars="5"
      /&gt;
  </code></pre>
  
  <p></p>