项目作者: AnkitDroidGit

项目描述 :
Animated Rating bars
高级语言: Kotlin
项目地址: git://github.com/AnkitDroidGit/AnimatedRatingSystem.git
创建时间: 2017-09-06T07:02:27Z
项目社区:https://github.com/AnkitDroidGit/AnimatedRatingSystem

开源协议:

下载


AnimatedRatingSystem

Used in live app

Download App and Traverse through

  • Hamburger -> Skills -> Select any skill -> Tap on any recylerviewitem.

A demo is shown here

GIF

Use maven repo and add it to project level build.gradle inside dependencies

  1. maven {
  2. url 'https://dl.bintray.com/ankitdroiddeveloper/FreeAnimatedRatingBar'
  3. }

Add dependency to app level build.gradle

  1. compile 'com.freeankit.animated_rating_system:animated_rating_system:1.0.3'

And use free animated rating bar as below

In XML

  1. <com.freeankit.animated_rating_system.FreeAnimatedRatingBar
  2. android:id="@+id/arb"
  3. android:layout_width="wrap_content"
  4. android:layout_height="30dp"
  5. android:layout_centerHorizontal="true"
  6. android:layout_marginTop="100dp"
  7. app:gapSize="10dp"
  8. app:max="5"
  9. app:numStars="5"
  10. app:progressImage="@drawable/icon_progress"
  11. app:rating="4.3"
  12. app:secondaryProgressImage="@drawable/icon_secondary" ></com.freeankit.animated_rating_system.FreeAnimatedRatingBar>

In Java/Kotlin activity

  1. val arb = findViewById<FreeAnimatedRatingBar>(R.id.arb) as FreeAnimatedRatingBar
  2. arb.setSeekable(true)
  3. arb.setNumStars(7)
  4. // arb.setStarGap(2)
  5. findViewById<Button>(R.id.btn).setOnClickListener({
  6. arb.startAnimate()
  7. })

See code for more.. Happy Coding !!!!

Contact - Let’s connect to learn together

License

  1. Copyright 2017 Ankit Kumar
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.