Image for post
Image for post

One of the projects I was working on recently, which was among the first activity recording apps, had a very complex screen with a lot of user interaction and data (referred to as Workout Summary Screen from now on). Naturally, as you’d expect, it had legacy code and tech, which was a blocker for extending it with new features. A decision was made to rewrite this screen so that it can be easily extended with new features and also get rid of weird bugs.

In this article, I’ll go through how I rewrote it, the technology and architecture I picked…

Image for post
Image for post
Photo by Adam Śmigielski on Unsplash

Epoxy, an Android library developed by Airbnb, is a widely known and used library for building complex screens in a RecyclerView.

It has built-in support for async diffing (using DiffUtil) and promotes immutability while enforcing best practices when working with RecyclerView.

In this article, I’m going to show you how you could build a list with expandable items, a.k.a. accordion, using Epoxy — assuming you’re already familiar with the library.

We’re going to build a list of video game titles grouped into genres.

Image for post
Image for post

Updated Dagger integration to recommend using Dagger Hilt: Dependency Injection, which greatly simplifies dependency injection in ViewModels.

Updated to Lifecycle ViewModel SavedState version 2.2.0.
Check out my sample Github repository for a complete working example of everything I discuss here.

Saved State module for ViewModel is a new library from Google that builds on top of ViewModel architecture component. It let's you restore the UI state after a process stop.

In this article, I'm going to walk you through the basic usage of this library and continue deeper into a more advanced use case of integrating it with Dagger:

Image for post
Image for post

So you decided to migrate your data access layer to use Room, but the number of tables in your database along with how deeply integrated your DAO classes are in your codebase (whether you’re using another ORM library or not) freaks you out. Based on all the guides you’ve read so far, you know that to get into Room’s world, it’s either all or nothing, right? Well, not really. …

Image for post
Image for post

Recently, I had the need to send a Slack message from our CI server during our Android app build. Since Android is built with Gradle and in my opinion Gradle is just pure awesomeness, I thought why not just have a task that does just that.

The first thing I did was to look for a pre-made solution in the form of a Gradle plugin. I found one, but it wasn’t flexible enough as I wanted it to be. …

This tutorial has been updated for Dagger 2.21

Dagger 2.10 introduced dagger-android, a new module specifically for Android that comes in addition to the main dagger module and compiler. In this tutorial we will go through the steps needed to get started with the new module — assuming you’re already familiar with Dagger.

This tutorial is focused on Activity injection, but might as well serve as a reference for other Android components.

Common Dagger Setup

A common Dagger setup on Android normally involves an Application Component and an Application Module where the former is used to inject Android components, such as Activity, Fragment…

Recently while working on a hobby project of mine, an XMPP chat client, I faced an issue fitting an Android Bound Service into MVP design pattern. The service took user input, processed it and finally passed the result to the Activity to be shown to the user. The project was implemented using MVP design pattern with Dagger2.

Due to the nature of Bound Services, being an Android component that is tightly coupled with the Activity, my main goal was to stick to MVP as much as possible and communicate with the service via the presenter. …

Nimrod Dayan

Software Engineer specialized in Android (

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store