title: Android ratingBar ignoring numStars
body: <p>I'm very new to Android development. I'm trying to add a ratingBar indicator to a layout screen that will be a ListView item, so the user sees a list of restaurant names with their star values to the right of each.</p>
  
  <p>I want to limit the view to 5 stars - i.e. it should never display more than 5 stars, and 5 only if the user has rated the restaurant as 5 stars (in another activity.)</p>
  
  <p>I've read <a href="https://stackoverflow.com/questions/19206135/using-rating-bar-in-android">this</a>, <a href="https://stackoverflow.com/questions/18252099/android-ratingbar">this</a>, and <a href="https://stackoverflow.com/questions/3858600/how-to-make-ratingbar-to-show-five-stars">this</a>, as well as the developer.android.com documentation for ratingBar, and I cannot for the life of me get it to display <em>only</em> 5 stars.</p>
  
  <p>Here's my layout code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:tools="http://schemas.android.com/tools"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingLeft="64dp"
                  android:paddingRight="32dp"
                  android:paddingTop="4dp"
                  android:paddingBottom="4dp"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/restaurantNameLabel"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_centerVertical="true"
          android:textColor="#000000"
          android:textSize="16sp"
          tools:text="Shamrock Club"
          /&gt;
  
      &lt;RatingBar
          android:id="@+id/ratingBar"
          style="?android:attr/ratingBarStyleSmall"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:numStars="5"
          android:stepSize=".01"
          android:isIndicator="true"
          android:rating="3"
          android:layout_toEndOf="@id/restaurantNameLabel"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is what it looks like in the Android Studio Design view; note there are 6+ stars displaying. What am I missing here?</p>
  
  <p><a href="https://i.stack.imgur.com/TAA7P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TAA7P.png" alt="enter image description here"></a></p>