rating Bar does not get certain numbers (integer) of stars

0

Hello, I'm using a rating bar in android studio and I used the following in the layout:

<RatingBar
   android:id="@+id/ratingBar"
   style="?android:attr/ratingBarStyleSmall"
   android:layout_height="wrap_content"
   android:layout_gravity="center_horizontal"
   android:background="#ffffff"
   android:isIndicator="false"
   android:numStars="5"
   android:padding="5dp"
   android:stepSize="1"
   android:layout_width="wrap_content" />

It turns out that no way she gets 5 stars, she shows 4 and a little 5. Does anyone know how to fix this? Thank you.

    
asked by anonymous 05.11.2016 / 00:08

1 answer

1

opa, then confirm that if this is what you need

<RatingBar
    android:id="@+id/ratingBar"
    style="?android:attr/ratingBarStyleSmall"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:background="#ffffff"
    android:isIndicator="false"
    android:numStars="5"
    android:padding="0dp"
    android:stepSize="1"
    android:layout_width="wrap_content">
</RatingBar>

Note that when using padding="5dp" I used padding="0dp" then it worked round, see the screens:

    
06.11.2016 / 14:31