SkillAgentSearch skills...

AndroidEasyList

A data-driven RecyclerView framework for building fast and flexible lists

Install / Use

/learn @MostafaTaghipour/AndroidEasyList

README

AndroidEasyList

iOS version is here

Framework to simplify the setup and configuration of Recyclerview adapter. It allows a type-safe setup of RecyclerView adapter. also provides out-of-the-box diffing and animated deletions, inserts, moves and changes.

Everything you need to implement your own lists:

  • Easy to use RecyclerView
  • Diffable
  • Header and footer
  • Pagination
  • Collapsiple
  • Loading footer
  • Empty View
  • Filterable
  • Multiple data type

<img width="290" alt="animation" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/animation.gif"> <img width="290" alt="expandable" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/expandable.gif"> <img width="290" alt="filtering" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/filtering.gif"> <img width="290" alt="message" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/message.gif"> <img width="290" alt="layout" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/layout.gif"> <img width="290" alt="pagination" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/pagination.gif"> <img width="290" alt="sectioned" src="https://raw.githubusercontent.com/MostafaTaghipour/AndroidEasyList/master/screenshots/sectioned.gif">

Requirements

  • Api 14+

Installation

Add JitPack to repositories in your project's root build.gradle file:

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

Add the dependency to your module's build.gradle file:

dependencies {
    ...
    implementation 'com.github.mostafataghipour:androideasylist:1.1.1'
}

Usage

  1. Define your model
data class Movie(
    val id : String,
    val title : String
)

//optional: If you want to use DiffUtil capabilities (e.g. automatic animations like delete, insert, move , reload)
//          inherit 'Diffable' ptotocol
: Diffable {
    override val diffableIdentity: String
        get() = title!!

    //optional: this function need for automatic reload
    override fun isEqualTo(other: Any): Boolean {
        return if (other is Movie) return this == other else false
    }
}
  1. Define RecyclerViewAdapter
private val adapter: RecyclerViewAdapter<Movie> by lazy {

    val adapter = object : RecyclerViewAdapter<Movie>(this){
        override fun getLayout(viewType: Int): Int {
            return  R.layout.item_list
        }

        override fun bindView(item: Movie, position: Int, viewHolder: RecyclerView.ViewHolder) {
            viewHolder as GenericViewHolder
            
            val mMovieTitle: TextView? = viewHolder.getView<TextView>(R.id.movie_title)
            mMovieTitle?.text = item.title
        }
    }
        
    return adapter
}


override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_filtering)

    recyclerView.adapter = adapter
}

  1. Set Data
    adapter.items = yourItems
  1. That's it, for more samples please see example project

Thanks for

Author

Mostafa Taghipour, mostafa@taghipour.me

License

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

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated6mo ago
Forks4

Languages

Kotlin

Security Score

87/100

Audited on Sep 8, 2025

No findings