This is not exactly an answer but I would like to show an alternative. Using a library called Iconify that allow you to use scalable vector icons on android apps and with a simple method you can create awesome ratingbar with icons.
The method
public static String montarEstrellasValoracion(float valoration,int starSize) {
String result="";
float cont=1f;
for(float i=1f;i<=valoration;i++){
if(valoracion==0){
break;
}
cont=i;
if((cont+0.5f)>=(valoration) && valoracion!=5f){
result+="{fa-star "+starSize+"dp} ";
result+="{fa-star-half-o "+starSize+"dp} ";
cont++;
break;
}else if((cont+0.5f)<(valoration) && (cont+1f)>(valoration) && valoration!=5f){
result+="{fa-star "+starSize+"dp} ";
result+="{fa-star "+starSize+"dp} ";
cont++;
break;
}
if(cont<=5){
result+="{fa-star "+starSize+"dp} ";
}
}
for(float j=cont;j<5f;j++){
result+="{fa-star-o "+starSize+"dp} ";
}
if(valoration==0){
result+="{fa-star-o "+starSize+"dp}";
}
return result;
}
And then on the onCreate method:
IconTextView valoracion = (IconTextView)item.findViewById(R.id.id_icon_textview);
valoracion.setText(montarEstrellasValoracion(valoration,15));
valoracion.setTextColor(Color.parseColor("#000");
The icons are from another awesome site called Font Awesome
Hope this help anybody!
android:minHeight="32dp"
to<RatingBar>
tag. – Word