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.
Get the code from this tutorial: https://wp.me/p8jOJP-82
Go to my website for more information, code examples and articles:
Follow me on social media: