Create a Complex RecyclerView Quickly with Groupie Library – Android Kotlin RecyclerView Tutorial

RecyclerView has become a standard element in any kind of Android app. It’s fast and efficient – at least for the user. For developers, however, it’s an entirely different story.

You have to manage so many things – create adapters, keep track of multiple view types and span sizes (when you’re using a GridLayoutManager). Let’s not forget that sometimes you want to use expandable groups with headers… Oh and you also have to manage your overall sanity when something breaks in the process!

Luckily there is a simple RecyclerView solution which works out-of-the-box but it can also be heavily customized if you want to play with it. Groupie is an open-source Android library aimed at helping you get rid of any RecyclerView related headaches.

Groupie organizes items into groups – Sections and ExpandableGroups. It supports the use of headers and updating the groups with changed items could not be simpler – just call update() and you don’t even need to call notifyItemMoved() or any of that stuff.


This post contains all the code that’s been written in this YouTube video.


You can also check out this GitHub repository:














Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Abayomi Yusuf

5 months ago

This was a great tutorial.
For me, it was better than the official documentation.

How do I implement an onCLicklistener for the item in my activity or fragment.
I am using a viewmodel for my fragment and I want to load a ‘details’ fragment when an item is clicked.

Development made simple

We're here to help you. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved