A RatingBar library for android, you can customize size, spacing, color and image easily, and support right to left.

Overview

AndRatingBar

API

A RatingBar library for android, you can customize size, spacing, color and image easily, and support right to left.
安卓RatingBar终极方案,继承自原生RatingBar,具有原生的滑动选择等特性,并且可以自定义大小,间距,颜色,图标,支持从右当左

Customize Size

Size Sample

Customize Spacing

Spacing Sample

Customize Color & Image

Style Sample

Right to Left Support

right to left

In RecyclerView

List Sample

Implementation

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

dependencies {
	implementation 'com.github.wsj1024:AndRatingBar:1.0.6'
}

Usage

In your layout file:

<per.wsj.library.AndRatingBar
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        app:starDrawable="@drawable/star_blue"
        app:bgDrawable="@drawable/star_gray"
        android:rating="2.5"/>

Event Listener:

ratingBar.setOnRatingChangeListener { ratingBar, rating, fromUser ->
   Log.e("ratingBar", "rating:$rating -- fromUser: $fromUser")
}

Configuration

AndRatingBar Inherit from Android RatingBar,so all the configuration of RatingBar can be
configured to AndRatingBar,for example:

  • android:rating="1" set the rating of RatingBar
  • android:numStars="8" set the number of star
  • android:layout_height="36dp" set the size of star
  • android:stepSize="0.5" set the step size of RatingBar
  • android:isIndicator="true" set if as indicator

AndRatingBar has it's own configuration as follows:

  • app:starDrawable="" set the drawable of star
  • app:bgDrawable="" set the background drawable of star
  • app:starColor="" set the color of star
  • app:subStarColor="" set the subColor of star
  • app:bgColor="" set the background color of star
  • app:keepOriginColor="" set if keep the origin color of star drawable
  • app:starSpacing="4dp" set the spacing of the star
  • app:scaleFactor="1.2" the sacle factor of the ratingbar which can change the spacing of the star
  • app:right2Left="true" right to left support

License

AndRatingBar is released under the Apache License version 2.0.

You might also like...

Clone of real world Chatting application Whatsapp built on Android Studio and Firebase

Clone of real world Chatting application Whatsapp built on Android Studio and Firebase

WhatsappChatApp About This Project Clone of real world Chatting application Whatsapp built on Android Studio and Firebase Programming Language Used :

May 23, 2022

requery - modern SQL based query & persistence for Java / Kotlin / Android

requery - modern SQL based query & persistence for Java / Kotlin / Android

A light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perfo

Jan 5, 2023

A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs.

HiddenApiRefinePlugin A Gradle plugin that improves the experience when developing Android apps, especially system tools, that use hidden APIs. Backgr

Jan 5, 2023

Sample Android App for WebRTC with Firebase as backend

Sample Android App for WebRTC with Firebase as backend

Android WebRTC Firebase Simple Demo App for Android WebRTC video call using Firebase Realtime Database as Signalling server. Prerequisites Firebase Ac

Dec 17, 2022

Realtime SOS Android Application. Location (GPS + Cellular Network) tracing application by alerting guardians of the User.

WomenSaftey Women Safety Android Application: Realtime SOS Android Application. Designed a Location (GPS + Cellular Network) tracing application by al

Nov 19, 2022

Android app for Ribbit, Broker API Reference App

Android app for Ribbit, Broker API Reference App

Ribbit Reference Implementation (Android) The reference implementation for designing the Android user interface of a broker-dealer trading application

Nov 24, 2022

A simple hello word Android Studio project for Haxe/Heaps

Heaps Android - Hello World An Android Studio project for a simple Heaps.io Hello World. I'm probably not maintaining this, but it may work and if not

Nov 30, 2022

Обучающий репозиторий по Android разработке, в котором содержатся приложения, в каждом из которых проработана та или иная тема.

Обучающий репозиторий по Android разработке, в котором содержатся приложения, в каждом из которых проработана та или иная тема.

LearningApps Проект LearningApps содержит в себе различные приложения, в каждом из которых проработано несколько тем по Android разработке. Дополнител

Nov 22, 2022

Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android

ORMLite Core This package provides the core functionality for the JDBC and Android packages. Users that are connecting to SQL databases via JDBC shoul

Dec 25, 2022
Releases(1.0.6)
Owner
dqq
Android Native App Development enthusiast. Kotlin evangelist. Dedicated to ui & network
dqq
MixStack lets you connects Flutter smoothly with Native pages, supports things like Multiple Tab Embeded Flutter View, Dynamic tab changing, and more. You can enjoy a smooth transition from legacy native code to Flutter with it.

中文 README MixStack MixStack lets you connects Flutter smoothly with Native pages, supports things like Multiple Tab Embeded Flutter View, Dynamic tab

Yuewen Engineering 80 Dec 19, 2022
EBQuery allows you to easily access databases through a REST API.

EBQuery Table of Contents Introduction - Enterprise Backend as a Service Requirements Getting started Using EBQuery Features Introduction - Enterprise

null 15 Nov 9, 2021
esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc esProc is the unique name for esProc SPL package. esProc SPL is an open-source programming language for data processing, which can perform comp

null 990 Dec 27, 2022
SceneView is a 3D/AR Android View with ARCore and Google Filament. This is the newest way to make your Android 3D/AR app.

SceneView is a 3D/AR Android View with ARCore and Google Filament This is Sceneform replacement Features Use SceneView for 3D only or ArSceneView for

SceneView Open Community 235 Jan 4, 2023
Provides many useful CRUD, Pagination, Sorting operations with Thread-safe Singleton support through the native JDBC API.

BangMapleJDBCRepository Inspired by the JpaRepository of Spring framework which also provides many capabilities for the CRUD, Pagination and Sorting o

Ngô Nguyên Bằng 5 Apr 7, 2022
A plugin for the ja-netfilter, it can replace strings dynamically.

plugin-mymap A plugin for the ja-netfilter, it can replace strings dynamically. Use the mvn clean package command to compile and use mymap-v1.0.1-jar-

zfkun 356 Dec 12, 2022
This is an automated library software built in Java Netbeans to reduce manual efforts of the librarian, students to ensure smooth functioning of library by involving RFIDs.

Advanced-Library-Automation-System This is an advanced automated library software built in Java Netbeans to reduce manual efforts of the librarian, st

DEV_FINWIZ 14 Dec 6, 2022
The application is a PoC that helps in identifying modern bankers, potentially malicious and remote controlling applications abusing Android AccessibilityService.

Motivation Project aims to help in: identifying keyloggers and events hijacking malicious applications such as Anubis/TeaBot, identifying a "fake bank

Krzysztof Pranczk 33 Dec 9, 2022