Questions tagged [epoxy]

Epoxy is am Android library by Airbnb for building screens in a Recycler View. Use this tag for questions about using the Epoxy library or building with the library via Gradle, etc.

Epoxy is an Android library for building complex screens in a RecyclerView. It abstracts the boilerplate of ViewHolder, item types, item ids, span counts, and more, in order to simplify building screens with multiple view types. Additionally, Epoxy adds support for saving view state and automatic diffing of item changes.

Main components:

  • EpoxyModel - controls the data and view binding for each item on screen. Models are generated from xml layouts or custom views.

  • EpoxyController - declares what models to add to a RecyclerView.

References:

65 questions
0
votes
1 answer

View binding with EpoxyModelWithHolder

I am using EpoxyModelWithHolder with multiple layouts in a single Epoxy model class. How can I do ViewBinding? Currently, I am using Kotlin-android-extensions. Below is my code @EpoxyModelClass abstract class ItemSampleEpoxyModel :…
Ameer
  • 2,709
  • 1
  • 28
  • 44
0
votes
1 answer

How can I Implement drag and drop functionality using Airbnb's Epoxy model?

I want to code this todo() part to perform drag and drop using Airbnb's Epoxy Library, I have this method onModelMoved() which I am not able to think what to code or approach need help ! EpoxyTouchHelper.initDragging(controller) …
0
votes
1 answer

The problem that the data of RecyclerView changes randomly

(Image 1 & Image 2) (Image 3) I'm currently using the Epoxy library instead of RecyclerView. However, since Epoxy is built on the basis of RecyclerView, let's just call it RecyclerView. Problem 1 . (Image 1 & Image 2) When i return to another…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

In the code, the type of the lambda is mismatched, how does it work?

I'm using the Epoxy library on Android. What I'm curious about is why the parameter of the lambda expression doesn't get an error when the type doesn't match. The listener is a lambda expression that takes an Int type as a parameter. But…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

Android two-way data binding, ObservableDouble doesn't trigger anything when changed

I'd appreciate your help please. I want to build a custom Checkbox Group like in the food delivery apps(uber eats, deliveroo). When the user select/unselect one item it should adjust the price automatically. This screen is built using a custom…
Dr4ke the b4dass
  • 1,184
  • 2
  • 17
  • 40
0
votes
1 answer

com.airbnb.epoxy.IllegalEpoxyUsage: You must set an id on a model before adding it

Using Epoxy Library first time. Getting bellow error rocess: in.droom, PID: 25269 com.airbnb.epoxy.IllegalEpoxyUsage: You must set an id on a model before adding it. Use the @AutoModel annotation if you want an id to be automatically generated for…
Ajeet Choudhary
  • 1,969
  • 1
  • 17
  • 41
0
votes
1 answer

How to get Item Position in EpoxyModelWithHolder?

I'm trying to add a RecyclerView to my app using Epoxy Library I need to get position of the item in bind method in EpoxyModelWithHolder but I don't know how to do that. I couldn't find any function to get the position of holder/item.
Hamid Sj
  • 983
  • 7
  • 19
0
votes
1 answer

How to avoid requestModelBuild for every widgets in a recyclerview

I have a recycler view with fixed number widgets vertically in a specific order. Some of the widgets also contain tabular data hence I've considered using nested recycler view also within it. Every widget makes http call asynchronously from the…
Bulu
  • 1,351
  • 3
  • 16
  • 37
0
votes
1 answer

Android EpoxyRecyclerView - switching orientation

I am trying to build the following layout structure with Epoxy: First three layouts are from EpoxyAModel. The fourth one is from the EpoxyBModel. This is my buildModels function: override fun buildModels() { aModels.forEach { //this happens…
Simon
  • 2,643
  • 3
  • 40
  • 61
0
votes
1 answer

How to set an ID to an EpoxyModelWithHolder?

I am currently adding using Epoxy 3.9.0 (first time using it) and I'm creating an EpoxyModelWithHolder. I'm setting an ID and I'm still getting: "You must set an id on a model before adding it." ModelClass abstract class PlayerModel:…
Dave
  • 59
  • 7
0
votes
0 answers

Android Lottie Animation does not auto start when set visible with Epoxy / DataBinding

I'm using Lottie and Epoxy in my Android project with DataBinding. I would like to start animation with LottieImageView when RecyclerView is snapped, but LottieImageView does not start animation, while it is set to autoPlay=true. The Epoxy…
MikakoTabe
  • 105
  • 1
  • 7
0
votes
1 answer

Airbnb epoxy with Viewpager and Youtubeplayer

I have a Viewpager which extends FragmentStatePagerAdapter with 2 fragments (each has com.airbnb.epoxy.EpoxyRecyclerView) Used Airbnb's Expoxy library to populate heterogeneous recyclerview The 1st fragment has youtube player (library used…
karthik kolanji
  • 2,044
  • 5
  • 20
  • 56
0
votes
1 answer

Epoxy : how to use the @AutoModel annotation and handle clicks without controller?

I am starting to use the epoxy library because I am looking for a library to write less code while using the RecyclerView component. The EpoxyRecyclerView seems to be a great component since you can simply give the models (basically a simple list),…
rolandl
  • 1,769
  • 1
  • 25
  • 48
0
votes
1 answer

How do I properly initialize a property in Epoxy ModelView when view state saving is enabled?

I have following code for the model view. When I disable saveViewState = true or remove it, checkbox?.isChecked is properly set by epoxy adapter (to true or false, according to isChecked boolean that is passed to the annotated method). But, when I…
0
votes
0 answers

Airbnb Epoxy For Gmail like Dashboard interface

am building an app which displays a list of objects .Am using android recycler view for now. Now as per new requirements , I want to display this list in groups , similar to as described in this Question My Question is : Can I implement it using…
1nullpointer
  • 1,212
  • 1
  • 13
  • 19