The RatingBar can set spacing between items. But, It can't set more status now. You can set progress and progressed for RatingBar's status. If you have more question, please call by Issue Click Here.
It's a demo by .xml:
<com.klavor.widget.RatingBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:progress="@drawable/btn_rating_star_off_normal"
app:progressed="@drawable/btn_rating_star_off_selected"
app:numStars="6"
app:rating="0"
app:stepSize="0.2"
app:spacing="10dp"
app:isIndicator="false"
app:automatic="fully"/>
Like custom RatingBar of Android.
RatingBar ratingBar = new RatingBar(this);
ratingBar.setRating(0);
ratingBar.setSpacing(10);
ratingBar.setIsIndicator(false);
ratingBar.setNumStars(5);
ratingBar.setStepSize(0.5F);
ratingBar.setProgress(null);
ratingBar.setProgressed(null);
ratingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
@Override
public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
}
});
In my project, I need a RatingBar that can set spacing between items, but some open source project and developer anwser can't resolve mine requirement.
Then I create this project.
But,the property "automatic" can't be effective.
RatingBar's method like RatingBar of Android, so you can easy to get started.
Thank me, A HaHa~
Copyright 2016 LiHuan