I need insert a space between the stars of my ratingBar, example the ratingbar is well:
but I need it thus:
how i can do this?
I don't know if it will be useful anymore, but I made a custom library which allows you to change space beetwen stars programatically and in XML (among other stuff): SimpleRatingBar.
It features:
android:layout_width
: it can be set to wrap_content
, match_parent
or abritary dp.In your case, you would just have to do:
ratingbar.setStarsSeparation(20, Dimension.DP);
or, for example, in pixels:
ratingbar.setStarsSeparation(100, Dimension.PX);
You can find it either in jcenter
or in Maven Central
. So in your build.gradle
file just add to your dependencies:
compile 'com.iarcuschin:simpleratingbar:0.1.+'