title: why my rating bar is not working properly
body: <p>I have rating bar in my activity, I would like to give rating, if I click on 2nd star 3rd star is also selected why it is selecting I can't find out the reason can anyone help me please. Here is my xml code</p>
  
  <pre><code>&lt;RatingBar
                          android:id="@+id/ratingBar1"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_gravity="left"
                          android:numStars="5"
                          android:stepSize="1"
                          android:theme="@style/rating3"
                          android:layout_marginEnd="20dp"
                          android:layout_marginStart="20dp"
                          android:layout_marginBottom="20dp"
                          android:layout_marginTop="-8dp"
                          tools:ignore="UnusedAttribute"
                          /&gt;
  </code></pre>
  
  <p>I am getting the value of rating using this java code</p>
  
  <pre><code>final String rating = String.valueOf(ratingbar1.getRating());
  </code></pre>