Epoxy is an Android library for building complex RecyclerView screens using a model-driven approach. It generates RecyclerView adapter models at compile time from annotated custom views, data binding layouts, or view holders, eliminating the manual boilerplate typically associated with view holders and adapters. The library provides a diffing engine that automatically compares model lists and applies minimal updates with animations for insertions, removals, and moves.
The library distinguishes itself through its controller-based model building, where a controller class with a buildModels method declaratively constructs immutable model lists and triggers rebuilds on data changes. It includes built-in horizontal carousel components with peeking and snapping behavior, supports background thread diffing to keep the UI thread responsive, and offers view pool sharing across multiple RecyclerView instances to maximize view recycling. Epoxy also provides visibility tracking with callbacks, pagination integration with the Android Paging Library, and view state persistence across configuration changes and scrolls.
Beyond its core capabilities, Epoxy offers extensive configuration options for annotation processing, including package-level defaults, model immutability enforcement, and compile-time validation of attribute equality and hash code implementations. It supports Kotlin DSL for declarative screen building, typed controllers for pure data flow, and interceptors for modifying model lists in aggregate. The library also provides memory management utilities, grid span size adaptation, and the ability to combine Litho components with traditional Android views in the same RecyclerView.