A simple Emoji Rating Bar library for Android completely written in Kotlin.

Overview

EmojiRatingBar

Kotlin Version Platform API

A simple Emoji Rating Bar library for Android completely written in Kotlin.

🛠 Installation

Add the JitPack repository to your build.gradle (Project) file

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

Add this line to your build.gradle (module)

implementation 'com.github.unaisulhadi:emojiratingbar:1.0.1'

⌨️ Usage

  • Add this in your layout xml file.
">
<com.hadi.emojiratingbar.EmojiRatingBar
                android:id="@+id/emoji_rating_bar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                app:showText="true"
                app:titleColor="#844848"
                app:defaultValue="AWFUL"
                android:fontFamily="@font/playfair_display_semibold" />
  • 5 EmojiRatingBar Rate Values
 0. RateStatus.AWFUL
 1. RateStatus.BAD
 2. RateStatus.OKAY
 3. RateStatus.GOOD
 4. RateStatus.GREAT

Parameters

Explanation Parameter Name Type Default Value
Set Title Color titleColor color Same as the Emoji Color
Set Show Title status showText boolean true
Set Default Rate defaultValue enum OKAY
Set FontFamily android:fontFamily font Android Default

Use Programmatically

Explanation Code Parameter Return type
Set Title Color setTitleColor(color) color reference
Set Show Title status setShowText(true) boolean
Get Show Title Status getShowText() boolean
Set Current Rate setCurrentRateStatus(rate) enum
Get Current Rate getCurrentRateStatus() rate
Set Title Font (from res) setTypeFace(font) font reference
Set Title Font (from Asset) setTypeFaceFromAssets(font) path to asset

Refer code below

  • Get current Rate Status of EmojiRatingBar.
emojiRatingBar.getCurrentRateStatus().toString()
  • Set Rate Status programmatically.
emojiRatingBar.setCurrentRateStatus(RateStatus.GOOD) //SET

  • Use OnRateChangeListener for observing Rate Changes
emojiRatingBar.setRateChangeListener(object : EmojiRatingBar.OnRateChangeListener {
            override fun onRateChanged(rateStatus: RateStatus) {
                //Do you Stuff
            }
        })
  • Do your stuff for separate values
emojiRatingBar.setRateChangeListener(object : EmojiRatingBar.OnRateChangeListener {
            override fun onRateChanged(rateStatus: RateStatus) {
               
               when (rateStatus) {

                    RateStatus.AWFUL -> {
                        //Do your code
                    }
                    RateStatus.BAD -> {
                        //Do your code
                    }
                    RateStatus.OKAY -> {
                        //Do your code
                    }
                    RateStatus.GOOD -> {
                        //Do your code
                    }
                    RateStatus.GREAT -> {
                        //Do your code
                    }

                }
            }
})

🍰 Contribute

Feel free to fork this project, to optimise the code or to add new features.

✍️ Author

📝 License

MIT License

Copyright (c) 2021 Unaisul Hadi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
Implement a simple and funny Android animation —— the emoji rain in WeChat app.
Implement a simple and funny Android animation —— the emoji rain in WeChat app.

中文版文档 Emoji Rain Hey, it's raining emoji! This is a really simple and funny animation for Android. You could find similar animations when sending "Hap

RatingRequest library is a simple android dialog for request rating and review.
RatingRequest library is a simple android dialog for request rating and review.

Rating Request RatingRequest library is a simple android dialog for request rating and review. ##Usage Add below line in app build.gradle dependencies

Completely customizable progress based loaders drawn using custom CGPaths written in Swift
Completely customizable progress based loaders drawn using custom CGPaths written in Swift

FillableLoaders Completely customizable progress based loaders drawn using custom CGPaths written in Swift Waves Plain Spike Rounded Demo: Changelog:

Completely customizable progress based loaders drawn using custom CGPaths written in Swift
Completely customizable progress based loaders drawn using custom CGPaths written in Swift

FillableLoaders Completely customizable progress based loaders drawn using custom CGPaths written in Swift Waves Plain Spike Rounded Demo: Changelog:

Yet another ToDo app, but the UI completely written in Jetpack Compose!
Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!
Yet another ToDo app, but the UI completely written in Jetpack Compose!

Yet another ToDo app, but the UI completely written in Jetpack Compose!

DrawBox: a multi-purpose tool to draw anything on canvas, written completely on jetpack compose
DrawBox: a multi-purpose tool to draw anything on canvas, written completely on jetpack compose

DrawBox DrawBox is a multi-purpose tool to draw anything on canvas, written comp

A library to show emoji in TextView, EditText (like WhatsApp) for Android
A library to show emoji in TextView, EditText (like WhatsApp) for Android

Discontinued This projected is discontinued. Please consider using other alternative, i.e EmojiCompat. Contact me if you want to continue working on a

Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨

RatingReviews RatingReviews (Rating and Reviews) is a widget and layout that adds a "Rating & Reviews" bar to your app, similar to the ones seen on Go

A rating scale android library
A rating scale android library

RatingScale A rating scale android library A customizable rating scale supporting a 1-10 scale. Usage In your layout.xml ?xml version="1.0" encod

Emoji Soundboard for #stupidhackth5 #sht5
Emoji Soundboard for #stupidhackth5 #sht5

Emoji Soundboard แอพพลิเคชั่น soundboard ที่ใช้ emoji ในการช่วยจำว่าช่องนี้เราใส่เสียงอะไรไว้บ้าง เป็นแอพแอนดรอยด์ (ผลงานระหหว่างร่วมงาน Stupid Hackat

Adds emoji support to the Minecraft chat.

WeirdChat 🥴 WeirdChat is a FabricMC mod that adds Emoji support to the Minecraft chat. Instead of completely rewriting the text renderer, Discord emo

This library allows to use customized Rating Dialog inside applications.
This library allows to use customized Rating Dialog inside applications.

Android Material App Rating This library allows to use customized Rating Dialog inside applications. Download compile 'com.stepstone.apprating:app-rat

A simple and completely secured notes android app
A simple and completely secured notes android app

Notes Our very first project A simple and completely secured notes app Your data is stored in a completely isolated mechanism which minimizes the risk

Easily notify a user with a simple alert, inform them of an optional update, and in dire situations block the user from accessing older versions of the application completely.
Easily notify a user with a simple alert, inform them of an optional update, and in dire situations block the user from accessing older versions of the application completely.

Gandalf In the lifetime of any application there will come a time where you need to drop support for a feature, end of life a product, notify about ma

Android图表库(XCL-Charts is a free charting library for Android platform.),基于Android Canvas来绘制各种图表,使用简便,定制灵活。目前支持3D/非3D/背向式/横向/竖向柱形图(Bar Chart)、3D/非3D饼图(Pie Chart)、堆叠图(Stacked Bar Chart)、面积图(Area Chart)、 折线图(Line Chart)、曲线图(Spline Chart)、环形图(Dount Chart)、南丁格尔玫瑰图(Rose Chart)、仪表盘(Dial Chart)、刻度盘(Gauge Chart)、雷达图(Radar Chart)、漏斗图(Funnel Chart)、圆形图(Circle Chart)、弧线比较图、散点图(Scatter Chart)、气泡图(Bubble Chart)、范围条形图(RangeBar Chart)等图表。其它特性还包括支持图表缩放、手势移动、点击响应、动画效果、多轴显示、图表参考线、混合图表及同数据源不同图表类型切换等。 A custom view for rating which easy to make and use, but function is excellent
A custom view for rating which easy to make and use, but function is excellent

QRatingView A custom view for rating which easy to make and use, but function is excellent Effect Picture Properties declare-styleable name="QRat

This is an Online Book App in which user can read and add their books on favourites fragment and also give rating on it.
This is an Online Book App in which user can read and add their books on favourites fragment and also give rating on it.

BookHub-AndroidApp BookHub Basic Android App Based on the concept of Fragment, Navigation Drawer, Database (Room), Internet Access, etc. See the app o

This is a specified proportion to the size of the Layout or View support library, with which you can easily set a fixed ratio of the size of the Layout or View, internal adaptive size calculation, completely abandon the code to calculate the size! If you have any questions in the course or suggestions, please send an e-mail to the following e-mail, thank you!
Comments
  • added empty state as defualt and show all text

    added empty state as defualt and show all text

    Added ability to show all text: This behaviour can easily allow users to know what each of the smiley stands for. Can be set using showAllText property

    Added Empty state by default: This would protect biasing user's choice to default option.

    opened by princeede 0
Releases(1.0.5)
  • 1.0.5(Aug 19, 2022)

  • 1.0.4(Feb 9, 2022)

  • 1.0.3(Jan 23, 2022)

    What's Changed

    • Added empty state for ratings.
    • Show all emoji titles option.
    • Contibuted by @princeede in https://github.com/unaisulhadi/emojiratingbar/pull/2

    New Contributors

    • @princeede made their first contribution in https://github.com/unaisulhadi/emojiratingbar/pull/2

    Full Changelog: https://github.com/unaisulhadi/emojiratingbar/compare/1.0.2...1.0.3

    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Jan 1, 2022)

    You can change default emoji title into your own version.

    emojiRatingBar.setAwfulEmojiTitle("Awful!") emojiRatingBar.setBadEmojiTitle("Bad!") emojiRatingBar.setOkayEmojiTitle("Okay!") emojiRatingBar.setGoodEmojiTitle("Good!") emojiRatingBar.setGreatEmojiTitle("Great!")

    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jun 26, 2021)

  • 1.0.0(Jun 25, 2021)

Owner
Unaisul Hadi
Android Developer | Kotlin | Flutter Enthusiast
Unaisul Hadi
RatingRequest library is a simple android dialog for request rating and review.

Rating Request RatingRequest library is a simple android dialog for request rating and review. ##Usage Add below line in app build.gradle dependencies

Habibur Rahman 28 Aug 10, 2022
A rating scale android library

RatingScale A rating scale android library A customizable rating scale supporting a 1-10 scale. Usage In your layout.xml <?xml version="1.0" encod

Tilak Sharma 3 Mar 26, 2022
This library allows to use customized Rating Dialog inside applications.

Android Material App Rating This library allows to use customized Rating Dialog inside applications. Download compile 'com.stepstone.apprating:app-rat

StepStone Tech 476 Nov 11, 2022
AndroidRate is a library to help you promote your Android app by prompting users to rate the app after using it for a few days.

AndroidRate AndroidRate is a library to help you promote your Android app by prompting users to rate the app after using it for a few days. Project ba

 Vorlonsoft LLC 129 Nov 24, 2022
A RatingBar library for android, you can customize size, spacing, color and image easily, and support right to left.

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

dqq 300 Aug 29, 2021
SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon.

Smiley Rating SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon. Drawn completely using android canvas Insp

Sujith Niraikulathan 1.1k Dec 22, 2022
A rating toggle for Android which switches between 3 rating levels: positive, neutral, and negative.

SimpleRatingView A rating toggle for Android which switches between 3 rating levels: positive, neutral, and negative. Usage Since, SimpleRatingView is

İhsan Işık 166 Nov 25, 2022
Compose-Ratingbar-library - A simple implementation for rating bar in Jetpack Compose

Compose-Ratingbar-library - A simple implementation for rating bar in Jetpack Compose

Mahmoud Hussein 14 Dec 21, 2022
A simple library to add Emoji support to your Android Application

Emoji A library to add Emoji support to your Android app. Emojis can be picked in a PopupWindow. In order to edit and display text with Emojis this li

Niklas Baudy 1.4k Jan 4, 2023
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

PhotoEditor A Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. Features D

Burhanuddin Rashid 3.6k Jan 9, 2023