FlagChatAdapter is easy to implement enchanting recycler view adapter

Overview

FlagChatAdapter

Description

FlagChatAdapter is easy to implement enchanting recycler view adapter. Just extend your adapter with FlagChatAdapter, impliment some methods and voila! You have got the most beautiful looking chat on your phone. Zero boilerplate code, just put your variables in the right direction



Installation

FlagChatAdapter can be installed using Maven, Gradle, or manually.

Maven

Step 1. Add the JitPack repository to your build file

<repositories>
    <repository>
        <id>jitpack.ioid>
        <url>https://jitpack.iourl>
    repository>
repositories>

Step 2. Add the dependency

<dependency>
    <groupId>com.github.salmaanahmedgroupId>
    <artifactId>FlagChatAdapterartifactId>
    <version>1.0.1version>
dependency>

Gradle

Step 1. Add the JitPack repository to your build file

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

Step 2. Add the dependency

dependencies {
    implementation 'com.github.salmaanahmed:FlagChatAdapter:1.0.1'
}

Manual Installation

If you prefer not to use either of the above mentioned dependency managers, you can integrate FlagChatAdapter into your project manually by adding the files contained in the java folder to your project.

Getting Started

Extend Your Adapter With FlagChatAdapter

Extend your adapter with FlagChatAdapter and pass context to the adapter

class ChatAdapter(context: Context, private var list: ArrayList<Any>) : FlagChatAdapter(context)

Implement methods

Implement required methods and variables. Write one line functions, isnt it so simple ;) You may see the sample for detail description

    //return chat message on the position passed as parameter
    abstract fun chatMessage(position: Int): String

    //return time of message as string format on the position passed as parameter
    abstract fun messageTime(position: Int): String

    //return message sender on the position passed as parameter, if its you, return true
    abstract fun isMe(position: Int): Boolean

    //you must have a variable of animation in the object i.e. if you want to animate or not
    abstract fun animation(position: Int): Boolean

    //the animation variable must be set to false when animation is performed once, otherwise flags will animate on every scroll
    abstract fun setAnimationStatus(position: Int, animationStatus: Boolean)
    
    //Name of the sender
    abstract val otherName: String

    //You shall simply return list.size
    abstract val listSize: Int

You have also got longClickEvents

    //You can implement whatever you want onLongClick event
    abstract fun onMessageLongClicked(position: Int)

Beautify your chat with provided customization. You can also change color of flags. Very simple to implement and looks awesome. You can find more details in sample app.

Contributions and Licence

FlagChatAdapter is available under the MIT license. See the LICENSE file for more info.

Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using FlagChatAdapter in your app, send an email to Salmaan Ahmed

You might also like...
Easy-Note - Easy Note Application will help user to add and update their important notes
Easy-Note - Easy Note Application will help user to add and update their important notes

Easy-Note 🗒️ Easy Note App helps you to create your notes. You can 📝 edit and

📱 AppListManager (Android Library) makes managing application and activity lists easy.
📱 AppListManager (Android Library) makes managing application and activity lists easy.

AppListManager (Android Library) AppListManager is easy to use Android library, which minimizes developing time when working on application or activit

Easy app for managing your files without ads, respecting your privacy & security
Easy app for managing your files without ads, respecting your privacy & security

Simple File Manager Can also be used for browsing root files and SD card content. You can easily rename, copy, move, delete and share anything you wis

Easy and quick contact management with no ads, handles groups and favorites too.
Easy and quick contact management with no ads, handles groups and favorites too.

Simple Contacts A simple app for creating or managing your contacts from any source. The contacts can be stored on your device only, but also synchron

This library makes it easy for you to develop an simple drawing app in android
This library makes it easy for you to develop an simple drawing app in android

DrawingCanvas Library for drawing app canvas Features Size , transperancy and color manupulation of brush -- Using setSizeForBrush(), setBrushAlpha()

The easy way to use biometric authentication in your Flutter app. Supports Fingerprint, FaceID and Iris.
The easy way to use biometric authentication in your Flutter app. Supports Fingerprint, FaceID and Iris.

BiometricX The easy way to use biometric authentication in your Flutter app. Supports Fingerprint, FaceID and Iris. Demo APK. Starting $ flutter pub a

Pomodroid is a flexible and easy to use Android Pomodoro Technique Timer.
Pomodroid is a flexible and easy to use Android Pomodoro Technique Timer.

Pomodroid - Android App Pomodroid is a flexible and easy to use Android Pomodoro Technique Timer. Unlike other services, pomodroid is free and open so

androidx window manager sample taken from the original source and modified for easy deploy and test

androidx-window-samples This project contains the WindowManager samples located in the androidx WM project location The goal of this project is to pro

Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.
Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.

Easy Note Easy Note: Notes app using JetPack Compose and MVVM with a clean architecture approach. This app shows the usage of the new Navigation Archi

Comments
  • FlagChatAdapter Updates.

    FlagChatAdapter Updates.

    Hello!

    I am currently using this adapter in an application and I'd like to contribute minor changes I made to the FlagChatAdapter code.

    Here's a summary:

    • Upgraded the project to Gradle 7.4.2
    • Changed compileSdkVersion from 27 to 32
    • Migrated project to use androidx
    • Replaced Kotlin synthetics with regular findViewById()
    • Improved KDoc comments.
    opened by IODevBlue 0
Releases(1.0.1)
Owner
Salmaan Ahmed
Salmaan Ahmed
Repository ini berguna untuk menyimpan kode yang dibutuhkan untuk membuat sebuah Aplikasi Android yang memiliki ListView yang menggunakan Custom Adapter dan Mengambil data dari Database secara CRUD.

AndroidListView Repository ini berguna untuk menyimpan kode yang dibutuhkan untuk membuat sebuah Aplikasi Android yang memiliki ListView yang mengguna

Bryan Yehuda Mannuel 1 Jan 2, 2022
Huawei-SmartAd Header Bidding Adapter Github Documentation

Huawei-SmartAd Header Bidding Adapter Github Documentation Introduction The Huawei Header Bidding adapter allows you to connect Huawei Publisher Servi

null 3 Jun 25, 2022
Sample to show how to implement blur graphical tricks

BlurEffectForAndroidDesign Sample to show how to implement blur graphical tricks All the explanations could be found here: http://nicolaspomepuy.fr/?p

Nicolas POMEPUY 2k Dec 28, 2022
Implement Dog vs Cat Prediction Model in Android app

This project aims to classify the input image as either a dog or a cat image. The image input which you give to the system will be analyzed and the predicted result will be given as output. Machine learning algorithm [Convolutional Neural Networks] is used to classify the image.

Aditya deshmukh 6 Oct 27, 2021
Implement Webpage in Android App

This is the application for add a webpage in a android app and act like a browser

Ankit P Chandran 1 Oct 14, 2021
The goal of this assignment is to implement GameOfFifteen

Game of Fifteen Demo The board for the game of Fifteen is filled randomly with numbers from 1 to 15 and one empty space. You can move the neighboring

Josue Lubaki 0 Dec 6, 2021
Learning about architecture with implement TMDB Restful API

PopCorn Movie and Tv Show list application. Build for learning about architecture (maybe it's clean architecture, but i don't know it's clean or not.

Muhamad Mashudi Ardi Winata 0 Jan 11, 2022
Implement Text Recognition using MLKit in Jetpack Compose using Kotlin

Implement Text Recognition using MLKit in Jetpack Compose using Kotlin. The application is built using Kotlin Programming Language with Jetpack Compose Navigation.

mohamed tamer 5 Jul 22, 2022
Happy-Birthday - Design and implement a single screen app that displays information

Happy Birthday Android App | Android Basics in Kotlin Course Solution code for t

Anas Tariq 1 Feb 6, 2022
This repo contains sample mobile apps that implement contributor design pattern

This repo contains sample mobile apps that implement contributor design pattern. This design pattern was evolved to establish clean contracts for the developers and partners in Teams Mobile code base

Microsoft 3 Jan 6, 2023