• Stars
    star
    111
  • Rank 307,813 (Top 7 %)
  • Language
    Java
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android Library to make it easy to add ReactButton feature in your app with Multi Reactions like Facebook or Linkedin, you can add many reactions as you want, you can also split them into a number of columns, and also customize the colours and text for each reaction

ReactButton

ReactButton


Android Library to make it easy to add ReactButton feature in your app with Multi Reactions like Facebook or Linkedin ...etc, you can add many reactions as you want, you can also split them into number of columns, and also customize the colors and text for each reactions

Codacy Badge CodeFactor Build Min API Stars Forks License Maven Central

Note

From version 2.0.0 and above the library will release without default icons to reduce the size and if you want the facebook reactions you can copy them from the example app here

Demo 😄

Documentation:

Add ReactButton To Your Current Project:

From Maven Central

implementation 'io.github.amrdeveloper:reactbutton:2.1.0'
Or Add ReactButton from Jitpack.io

Add it in your root build.gradle at the end of repositories

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

Add the dependency

implementation 'com.github.AmrDeveloper:ReactButton:2.1.0'

How To Initializing ReactButton:

ReactButton reactButton = findViewById(R.id.buttonId);

Set your Reactions:

reactButton.setReactions(Reaction... reaction);

Add new Reactions to the reactions list:

reactButton.addReactions(Reaction... reaction);

Set Current Reaction:

reactButton.setCurrentReaction(Reaction reaction);

Get Current Reaction:

Reaction currentReaction = reactButton.getCurrentReaction();

Set Default Reaction:

reactButton.setDefaultReaction(Reaction reaction);

Get Default Reaction:

Reaction currentReaction = reactButton.getDefaultReaction();

Change Reaction dialog default Style:

reactButton.setReactDialogShape(int styleID);

Change the reactions dialog default gravity, make sure you have disabled the dynamic position

reactButton.setReactionDialogGravity(newGravity);

Enable/Disable the reactions dialog dynamic position

reactButton.enableDialogDynamicPosition(isEnabled);

Change the number of reactions in the Columns, the default value is all reactions size

reactButton.setDialogColumnsNumber(n);

Set the dim amount for the reactions dialog from 0 for no dim to 1 for full dim, the default value is 0

reactButton.setDimAmount(dim);

Change tooltip background shape

reactButton.setReactionTooltipShape(R.drawable.shape);

Change tooltip text color

reactButton.setReactionTooltipTextColor(Color.BLACK);

Change offset between the reaction icon and the tooltip text

reactButton.setTooltipOffsetFromReaction(100);

Enable or Disable the Reaction tooltip feature

reactButton.setEnableReactionTooltip(true);

Set setOnReactionChangeListener:

reactButton.setOnReactionChangeListener(new ReactButton.OnReactionChangeListener() {
    @Override
    public void onReactionChange(Reaction reaction) {
        // Code that will execute when the reaction changed
    }
});

Set OnReactionDialogStateListener:

reactButton.setOnReactionDialogStateListener(new ReactButton.OnReactionDialogStateListener() {
    @Override
    public void onDialogOpened() {
        // Code that will execute when the reaction dialog is opened
    }

    @Override
    public void onDialogDismiss() {
        // Code that will execute after the reaction dialog is dismissed
    }
});

Check if current Reaction is Default Reaction:

boolean isDefault = reactButton.isDefaultReaction();
For full example please check the example app here

More Repositories

1

GQL

Git Query language is a SQL like language to perform queries on .git files with supports of most of SQL features such as grouping, ordering and aggregations functions
Rust
3,062
star
2

ClangQL

ClangQL is a tool that allow you to run SQL-like query on C/C++ Code instead of database files using the GitQL SDK
Rust
441
star
3

CodeView

Android Library to make it easy to create an Code editor or IDE that support any languages and themes, with auto complete, auto indenting, snippets and more features
Java
368
star
4

TreeView

Multi roots TreeView 🌴 implementation for Android Platform with a lot of options and customization
Java
171
star
5

LinkHub

LinkHub is a simple and effective link management application that can help you to easily manage your app with no ads!
Kotlin
153
star
6

EasyAdapter

Android Annotation Processing Library to generate your adapters only with Annotations on your model, support working with Kapt and KSP Processors
Kotlin
80
star
7

Amun

A Statically typed, compiled general purpose low level programming language built using C++ and LLVM Infrastructure framework designed to be simple and fast
C++
61
star
8

FileQL

A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.
Rust
56
star
9

LottieDialog

Android Library to create Lottie animation view dialog easily with a lot of customization
Java
54
star
10

Lineeditor

A new cross platform general prupose Line editor implementation designed with the goal to be flexible and customizable
Rust
43
star
11

Astro

Free and Open Source Java IDE Side Project that can compile and run java code and other features for editor like auto complate and auto import for packages
Java
33
star
12

AndroidResourceManager

Android Resource Manager application to manage and analyse your app resources with many features like image resize, Color, Dimens and code Analysis
Java
30
star
13

Turtle

Turtle Graphics 🐢 implementation for Android Platform with Code Editor, Preview Screen and packages
Kotlin
28
star
14

Askme

Social media app to ask and answer user questions and interact with users
Kotlin
22
star
15

Sparkler

Cross platform API request builder to make HTTP with different methods and WebSocket connection and you can send and receive data
Java
22
star
16

Tank

Dynamic type Object oriented and scripting language written in Java
Java
21
star
17

Android

Android Apps from courses and side projects
Java
16
star
18

SnapMacro

Free and Open source Cross-platform bot creator with a new scripting language called snap to interact with the mouse, keyboard, and screen using Snap scripting language
Java
13
star
19

FastMind

Online Android Real-time Quiz Game with nodejs and socket.io on the backend
Java
11
star
20

Echo

Compiler And Virtual Machine for Lox Programming Language written in C
C
6
star
21

MenuApp

Menu Simple Applicaion for Restaurant
Java
5
star
22

Kong

Kong is an implementation of the Monkey interpreter in Java 8 from The Writing An Interpreter In Go books
Java
5
star
23

FlutterQuizGame

Flutter quiz app for Flutter Create challenge 2019
Dart
5
star
24

PascalWCI

Pascal Interpreter and Debugger Project written in Java from Writing Compilers and Interpreters A Software Engineering Approach, Third Edition book
Java
5
star
25

Monkey

Monkey programming language 🐒 project from "Writing An Interpreter In Go" and "Writing A Compiler In Go" Books
Go
5
star
26

Done

Compiler to generate C Code and executable with many features and syntax sugger
C++
5
star
27

yamler

YAML modification program to parse, generate and modify yaml code and comments
Dart
4
star
28

DataStructuresAndAlgorithms

Data Structures And Algorithms Implementation
Java
4
star
29

TaskTimer

Android Application to find how many time your project take and run any number of time counters in the same thread by observer pattern
Java
4
star
30

JavaFX

JavaFX Desktop Side Projects
Java
3
star
31

CurrencyExchange

Android App is written in Kotlin with MVVM Arch with RxJava, Dagger2, LeackCanary libraries to get rates for more than 180 currency and draw Chart for these rates
Kotlin
3
star
32

Validera

NodeJS object validation to check type and value with multi conditions
JavaScript
2
star
33

Nand2Tetris

Start from NAND gate to build a Computer that can run the Tetris game
Hack
2
star
34

bee-lang

Bee is interpreted programming language for LangJam 2021 Created in less than 48h based on first-class comments theme
Java
2
star
35

checkstyle-reports

Static web pages for checkstyle pull request reports
HTML
2
star
36

GitEcho

Github Clone App to seach with pagination
Java
2
star