Skip to content

damanpreetsb/RatingBar

Repository files navigation

RatingBar

Android library to animate rating bar

DEMO


DOWNLOAD

Add this to your root build.gradle file

allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }

Add this to your app module's build.gradle file

dependencies {
            implementation 'com.github.damanpreetsb:RatingBar:v1.0'
    }

USAGE

 <com.daman.library.SimpleRatingBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:total_stars="3"
        app:animation="alpha" />

Available animations are:

  • alpha
  • rotation
  • scale
  • ring
  • flip

Change drawables

 <com.daman.library.SimpleRatingBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:total_stars="3"
        app:animation="alpha"
        app:drawable_empty="@drawable/ic_favorite_border_black_24dp"
        app:drawable_filled="@drawable/ic_favorite_black_24dp"  />

License

Copyright 2018 Damanpreet Singh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.