All Projects → salmaanahmed → Flagchatadapter

salmaanahmed / Flagchatadapter

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.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Flagchatadapter

MultiTypeAdapter
RecyclerView通用多类型适配器MultiTypeAdapter,以布局文件为单位更细粒度的条目复用。
Stars: ✭ 18 (-53.85%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Zoomrecylerlayout
🎢 Zoom Recycler Layout Manager For Android Kotlin
Stars: ✭ 618 (+1484.62%)
Mutual labels:  animation-library, recyclerview, recyclerview-adapter
Poweradapter
Adapter for RecyclerView(only 21KB).RecyclerView万能适配器(仅21KB)
Stars: ✭ 112 (+187.18%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Modular2Recycler
Modular²Recycler is a RecyclerView.Adapter that is modular squared.
Stars: ✭ 72 (+84.62%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
PrimeAdapter
PrimeAdapter makes working with RecyclerView easier.
Stars: ✭ 54 (+38.46%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Fastadapter
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
Stars: ✭ 3,512 (+8905.13%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Tableview
TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
Stars: ✭ 2,928 (+7407.69%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-61.54%)
Mutual labels:  adapter, recyclerview, recyclerview-adapter
Recyclerviewtemplate
One Template which solves all frequently used RecyclerViews Code Snippets
Stars: ✭ 404 (+935.9%)
Mutual labels:  recyclerview, recyclerview-adapter
Recycler Fast Scroll
Provides fast scroll and section idexer for recycler view
Stars: ✭ 445 (+1041.03%)
Mutual labels:  recyclerview, recyclerview-adapter
Easyxrecyclerview
主要提供了简单易用强大的RecyclerView库,包括自定义刷新加载效果、极简通用的万能适配器Adapter、万能分割线、多种分组效果、常见状态页面、item动画效果、添加多个header和footer、侧滑、拖拽、Sticky(黏性)效果、多item布局等,各模块之间灵活、解耦、通用、又能相互组合使用。
Stars: ✭ 607 (+1456.41%)
Mutual labels:  recyclerview, recyclerview-adapter
Brvah kotlin
This is kotlin BRVAH Demo
Stars: ✭ 402 (+930.77%)
Mutual labels:  recyclerview, recyclerview-adapter
Multiitem
一个优雅的实现多类型的RecyclerView类库 支持DataBinding Form表单录入 跨多个RecyclerView拖动
Stars: ✭ 381 (+876.92%)
Mutual labels:  adapter, recyclerview
Baserecyclerviewadapterhelper
BRVAH:Powerful and flexible RecyclerAdapter
Stars: ✭ 22,524 (+57653.85%)
Mutual labels:  recyclerview, recyclerview-adapter
Adapter
A quick adapter library for RecyclerView, GridView, ListView, ViewPager, Spinner
Stars: ✭ 376 (+864.1%)
Mutual labels:  adapter, recyclerview
Klaster
Declare RecyclerView adapters in a functional way, without boilerplate and subclassing. No compromises on flexibility. If it's possible to do something by subclassing, it's possible to do it with this library.
Stars: ✭ 373 (+856.41%)
Mutual labels:  recyclerview, recyclerview-adapter
Superadapter
[Deprecated]. 🚀 Adapter(BaseAdapter, RecyclerView.Adapter) wrapper for Android. 一个Adapter同时适用RecyclerView、ListView、GridView等。
Stars: ✭ 638 (+1535.9%)
Mutual labels:  adapter, recyclerview
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+1817.95%)
Mutual labels:  recyclerview, recyclerview-adapter
Multityperecyclerviewadapter
一个专注于RecyclerView优雅刷新(接管资源和数据源)、高灵活、低耦合、健壮性以及高效性的MVP模式库,支持大多数Adapter
Stars: ✭ 763 (+1856.41%)
Mutual labels:  adapter, recyclerview
Expandablerecyclerview
A very simple example of how the expandable RecyclerView can be implemented
Stars: ✭ 16 (-58.97%)
Mutual labels:  recyclerview, recyclerview-adapter

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.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Step 2. Add the dependency

<dependency>
    <groupId>com.github.salmaanahmed</groupId>
    <artifactId>FlagChatAdapter</artifactId>
    <version>1.0.1</version>
</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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].