π A super simple rating star view for Android! π
StarView accepts ratings from 0.0 - 10.0 with 0 being the least β & 10 being the highest π. StarView will render bordered star, half filled star or full filled star based on the rating that is set. StarView has 3 levels of rating and accepts double value.
- Any rating less than 3.3 is considered as low rating.
- Any rating between 3.3 and 6.6 inclusive of both is considered as medium rating.
- Any rating greater than 6.6 is considered as high rating.
1. Add gradle dependency
dependencies {
compile 'com.anjith.starview:starview:1.0.1'
}2. Add view to layout
<com.anjith.starview.StarView
android:id="@+id/star_view"
android:layout_width="22dp"
android:layout_height="22dp"
app:rating="3.4"/>3. Usage
StarView starView = (StarView) findViewById(R.id.star_view);
starView.setRating(9.3);That's it.
If you like this library, please tell others about it π. Contributions are always welcome.
StarView is released under MIT license. See file LICENSE