Animations and Performance in Nested RecyclerViews

This page summarizes the projects mentioned and recommended in the original post on /r/RedditEng

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
  1. flexbox-layout

    Flexbox for Android

    In order to properly encapsulate the reaction view logic, we created a class that extends RecyclerView and has a bind method that takes in the list of reactions and updates the RecyclerView’s adapter with that list. Given that we had to support a multi-line layout, we initially looked into using GridLayoutManager to achieve this but ended up finding an open-source library by Google named flexbox-layout that provides a LayoutManager that supports laying out items in multiple flex-rows, which is exactly what we needed. Using these ingredients, we were able to get a simple version of our layout up and running. What’s next was adding custom animations and improving performance.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. recyclerview-animators

    An Android Animation library which easily add itemanimator to RecyclerView items.

    Next, we looked at overriding SimpleItemAnimator but noticed that this class is missing a lot of logic required for orchestrating the animations. We realized that the Android SDK does not really allow us to easily customize RecyclerView item animations - what a shame! Doing some research on this we found two open-source libraries (here and here - note: this is no endorsement) that provide a variety of custom ItemAnimators by using a base ItemAnimator implementation that is very similar to the DefaultItemAnimator class but allows for proper customization. We ended up creating our own BaseItemAnimator by looking at DefaultItemAnimator and adapting it to our needs and then creating the actual implementation for the reaction feature. This allowed us to customize the “Add” animation like so:

  4. ItemAnimators

    ItemAnimators: Supercharged Animators for your RecyclerView

    Next, we looked at overriding SimpleItemAnimator but noticed that this class is missing a lot of logic required for orchestrating the animations. We realized that the Android SDK does not really allow us to easily customize RecyclerView item animations - what a shame! Doing some research on this we found two open-source libraries (here and here - note: this is no endorsement) that provide a variety of custom ItemAnimators by using a base ItemAnimator implementation that is very similar to the DefaultItemAnimator class but allows for proper customization. We ended up creating our own BaseItemAnimator by looking at DefaultItemAnimator and adapting it to our needs and then creating the actual implementation for the reaction feature. This allowed us to customize the “Add” animation like so:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How do you make your grid recyclerview items fit with different screen sizes?

    1 project | /r/androiddev | 24 Jan 2023
  • Am I the only one that feels Compose is a step backward?

    2 projects | /r/androiddev | 18 Jan 2022
  • Is it obligatory to use sp?

    1 project | /r/Kotlin | 6 Nov 2021
  • New to iOS dev, how do I create something similar to flexbox layout (from Android) in SwiftUI?

    1 project | /r/iosdev | 31 Oct 2021
  • Example where Flow widget in ConstraintLayout shines

    1 project | /r/android_devs | 24 Mar 2021

Did you know that Kotlin is
the 16th most popular programming language
based on number of references?