# Build complex screens faster on Android with Epoxy

DevFeed: [Build complex screens faster on Android with Epoxy](<https://devfeed.tech/articles/build-complex-screens-faster-on-android-with-epoxy-24563.md>)

Original publisher: [Read original article](<https://medium.com/bleeding-edge/build-complex-screens-faster-on-android-1773c5a64352?source=rss----d8ebe85cdc0f---4>)

Author: Akshay Chordiya

Published: 2019-12-30T13:31:50Z

Content type: tutorial

Language: en

Sources: [Bleeding Edge - Medium](<https://devfeed.tech/sources/bleeding-edge-medium.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [ui](<https://devfeed.tech/topics/ui.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [class](<https://devfeed.tech/tags/class.md>), [component](<https://devfeed.tech/tags/component.md>), [components](<https://devfeed.tech/tags/components.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [epoxy](<https://devfeed.tech/tags/epoxy.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [layout](<https://devfeed.tech/tags/layout.md>), [library](<https://devfeed.tech/tags/library.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recyclerview](<https://devfeed.tech/tags/recyclerview.md>), [ui](<https://devfeed.tech/tags/ui.md>), [view](<https://devfeed.tech/tags/view.md>)

## AI overview

This tutorial explains how Clue adopted Airbnb's Epoxy library with RecyclerView to build complex Android screens. It covers Epoxy models, adapters and controllers, declarative layouts, and a unidirectional data-flow pattern related to MVVM and MVI.

## Source excerpt

Rowing the boat -- Illustration by Marta PucciBuild complex screens faster on Android⚡ -- Our journey with Epoxy RecyclerView is such an important UI component on Android. But using it can get complex and error prone--especially when dealing with different view types and pagination. Moreover, it's hard when working on the same screen within the team. In this article, I'm going to share basics of Epoxy and an overview of the problems it helped us solve. Here's our journey of how we adopted Epoxy at Clue to build our UIs faster in parallel within the team.⚡ Backstory It all started with our users, who wanted a more understandable and interactive view of their historical tracking data. ✨(For Clue users, this is generally their menstrual cycles & symptoms.) So our awesome design team came up with this beautiful intuitive design 😍: Enhanced Analysis screen in Clue app I know what you're thinking already: that's a lot of view types. And we were definitely concerned about the performance and responsiveness of the screen. That's when we decided to see if we could use any third-party library to help us with our goal. Epoxy Epoxy is a library from Airbnb which takes a declarative / composable approach to build the UI--typically, a list. It uses RecyclerView under the hood It simplifies creation of static and dynamic layouts Each item in the list is associated to an epoxy model which defines the item's layout and manages binding the data and releasing the view's resources when it's recycled. Item <-> Epoxy Model <-> Layout resource The order of the items shown on the UI is based on how you add the model to the adapter or controller. Philosophy Epoxy encourages a usage pattern similar to the popular MVVM and MVI architecture where the data flows in one direction (UDF - uni-directional data flow). Flow with Epoxy The data forms the state of the UI then goes to EpoxyModel and to the views on the RecyclerView . The Epoxy Model behaves like a ViewModel and provides the interface betwe