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
11
votes
4 answers

How to implement 'Snap to center' feature for lists in Jetpack Compose?

In EpoxyRecyclerView with Horizontal LinearLayout there is a Snap to center feature which works like, If i scroll the list with good speed, it keeps on scrolling until it slows down and rests with an item at center. And if I scroll slowly and lift…
5
votes
1 answer

PagedList RecyclerView jumping after pagedList invalidation

Setup : We are using PagedListEpoxyController, RxPagedListBuilder, ItemKeyedDataSource with a runtime Mockgenerator which just creates a user with respect to the index of data that is generated, for eg. user1, user100, user500 etc. Paging…
erluxman
  • 18,155
  • 20
  • 92
  • 126
5
votes
0 answers

How to do UI test with airbnb epoxy?

Currently I'm working in a project that's using epoxy and I'm having a hard time thinking on how could I create UI/integration tests with it. At Epoxy github's repository I've only got a hint about testing the RecyclerView but I don't think this is…
Ana Paula
  • 8,733
  • 3
  • 16
  • 16
5
votes
2 answers

Why Epoxy does not generate model class?

I want to use Epoxy for my recyclerView with kotlin, but Epoxy Model does not generate PostModel_() class, what wrong with it? @EpoxyModelClass(layout = R.layout.iteam) abstract class PostModel : EpoxyModelWithHolder() { …
manwhotrycoding
  • 931
  • 1
  • 7
  • 13
4
votes
2 answers

Epoxy Processor Exception: Unable to get layout resource for view ModelView

I try to create Epoxy ModelView according to their Wiki documentation. I am getting this error: "Epoxy Processor Exception: Unable to get layout resource for view TitleModel" This is my Java code: import ... @ModelView public class ModelViewA…
Mantaz
  • 333
  • 1
  • 4
  • 12
3
votes
1 answer

onSwipeCompleted view dissapiers, have empty space and swipe doesnt work any more

I am using EpoxyTouchHelper. onSwipeCompleted view disappears leaving empty space. I update controller's data with updated data controller.setData(List); but it doesn't help. As well swipe stops working and I can't swipe any other item. privat…
Mantaz
  • 333
  • 1
  • 4
  • 12
3
votes
0 answers

How to implement collapsable/expandable items in a list with Epoxy?

How properly to implement collapsing/expanding items using Epoxy Android library? I went through the wiki and sample app and couldn't find any example or explanation how exactly implement such behaviour in the list?
Arsenius
  • 4,972
  • 4
  • 26
  • 39
2
votes
1 answer

How to fix java.lang.AbstractMethodError in android?

I switched from a recyclerview to using an epoxy list controler to display the results of a web response in my application. My response is handled in the right way and is transfered in my model class. Unfortunately after I received the response I…
Felix m
  • 59
  • 1
  • 10
2
votes
3 answers

Epoxy updating the epoxy attributes in the models once they have been built results in crash

App has crashed, executing CustomActivityOnCrash's UncaughtExceptionHandler com.airbnb.epoxy.ImmutableModelException: The model was changed between being added to the controller and being bound Controller class class SortFilterController @Inject…
ant2009
  • 27,094
  • 154
  • 411
  • 609
2
votes
0 answers

Stop scroll of Epoxy Recyclerview on item update

I am new to Epoxy Recyclerview. My query is as follows. I have added quite a few items in recyclerview using kotlin databinding, those consists of banners, title, grid, product carousel. I have a button which adds product in wishlist and changes…
Adriel Ad
  • 53
  • 6
2
votes
2 answers

Simple TextView not showing in Airbnb Epoxy

Iam trying to show a simple text view using epoxy in a recyclerview but it does not appear. What could I be doing wrong. I expected something like this But I am getting this instead //build.gradle implementation…
Dr Deo
  • 4,650
  • 11
  • 43
  • 73
2
votes
1 answer

EpoxyModels are not working in feature modules/library projects in Android

EpoxyModels are not compiling when using inside feature modules of Android App. @EpoxyModelClass(layout = R.layout.layout_foo) //an annotation argument must be a compile-time constant here abstract class FooModel :…
Bulu
  • 1,351
  • 3
  • 16
  • 37
2
votes
1 answer

How to setup Epoxy clickListener callbacks properly?

I have implemented epoxy according epoxy Wiki. I have several List. I update the controller with the first List, everything works fine. But then I update with the next List, data showed properly from second List in Epoxy…
Mantaz
  • 333
  • 1
  • 4
  • 12
2
votes
0 answers

Epoxy and pooling of EpoxyModels

I'm implementing EpoxyRecyclerView with EpoxyController. Since my use case calls for recreation and diffing of models pretty rapidly (on the order on 100 models each second or so), I'm worried about memory churn from the great amount of (relatively…
jpop
  • 1,094
  • 1
  • 7
  • 19
2
votes
1 answer

Epoxy requires every model attribute to implement equals and hashCode error

I have created a small test app for this issue here: (https://github.com/Winghin2517/EpoxyExample2). I would like to pass a list of objects into the epoxy controller so that I can generate a graph. I have however encountered this error when…
Simon
  • 19,658
  • 27
  • 149
  • 217
1
2 3 4 5