Skip to content

EpoxyRecyclerView

Eli Hart edited this page Sep 27, 2017 · 14 revisions

Since 2.6.0. This is in Beta, please leave feedback by opening an issue!

Epoxy provides the EpoxyRecyclerView class to enable easy integration between Epoxy and RecyclerView. The goal of this class is to reduce boilerplate in setting up a RecyclerView by applying common defaults. Additionally, several performance optimizations are made.

Improvements in this class are:

  1. A single view pool is automatically shared between all EpoxyRecyclerView instances in the same activity. This should increase view recycling potential and increase performance.

  2. A layout manager is automatically added with sane defaults.

  3. Fixed size is enabled if this view's size is MATCH_PARENT

  4. If a GridLayoutManager is used this will automatically sync the span count with the EpoxyController.

  5. Helper methods to set models without needing to create a EpoxyController class.

  6. Set an EpoxyController and build models in one step with setEpoxyControllerAndBuildModels

  7. Defaults for usage as a nested recyclerview are provided in Carousel.