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
1
vote
1 answer

Mockito testing EpoxyController throws NPE on instantiation

I use Airbnb's Epoxy 2.0 and I want to unit test my Controller. Whenever I try to instantiate a new Controller using Mockito it gives me a NPE. Perhaps going down Mockito is the wrong route here. I've never used anything besides Mockito, Espresso…
Josh Laird
  • 6,974
  • 7
  • 38
  • 69
0
votes
0 answers

Epoxy Carousel nesting vertical scroll with Tabs

I'm looking to achieve this with Epoxy. The reason for this is I have build a single tab but want to create two tabs with the Tab row. It's recommended to use the Carousel with Epoxy as the ViewPager replacement but I don't see how to do these two…
ono
  • 2,984
  • 9
  • 43
  • 85
0
votes
0 answers

How to trigger a screen re render after the user has chosen a filter without leaving the screen

I'm currently trying to implement a list using paging 3. My current implementation allows me to load a list of data, choose a filter option but the screen is not automatically refreshing at the moment with the filtered list. It's only doing so at…
0
votes
0 answers

Memory-Leak or LeakCanary Bug

Here’s the situation: I’m using Navigation component, Airbnb Epoxy, TwoPaneSlidnig, Databinding and MVVM architecture I have one Activity, few Fragments, two Navhost (one for detail-pane and the main one) Problem: When I navigate to the other…
Amit
  • 53
  • 4
0
votes
0 answers

Position in fun isStickyHeader(position: Int) larger than models size in Epoxy android?

I want a summary model to be the sticky header so I added the following check. override fun isStickyHeader(position: Int): Boolean { val model = adapter.getModelAtPosition(position) return (model is RoleHeader) || (model is StaffHeader) } I…
NDC00
  • 11
  • 2
0
votes
0 answers

How can I find and understand epoxy property for abaqus model?

I am creating FEA model by abaqus. But I can not find an epoxy property. When I get this property in google, youtube, or research gate then I can not understand it. I was trying google and youtube research gate etc. I am finding some data but I…
0
votes
1 answer

How to fix EpoxyModel does not work with PagingDataEpoxyController [Android(Kotlin)]

It works fine until PagingDataEpoxyController but when passing data to EpoxyModel the apk crashes. This is my code, plaese help me @EpoxyModelClass abstract class PostCommentModel : EpoxyModel() { @EpoxyAttribute lateinit var commentData :…
B_B
  • 1
0
votes
0 answers

How to fix EpoxyModel does not known in buildItemModel of PagingDataEpoxyController [Android(Kotlin)]

@EpoxyModelClass abstract class SocialInboxModel : EpoxyModel() { override fun bind(view: LayoutExchangeRateBinding) { super.bind(view) ... }} class ExchangeRateController( private val context: Context, ) : PagingDataEpoxyController()…
B_B
  • 1
0
votes
1 answer

How to reflect UI changes to the Controller's Underlying data in Epoxy

I am new to Epoxy and I'm currently trying some use-cases to check if it's a good fit for my project. I understand that the data that are set to a Controller should be immutable. In my case I have a View with several toggles and checkboxes and I…
Libathos
  • 3,340
  • 5
  • 36
  • 61
0
votes
0 answers

Epoxy CarouselModel_ spanSizeOverride didn't work

I need 2 span count carousel. So I used spanSizeOverride and it did'nt work. it's sitll show only 1 spancount. CarouselModel_() .spanSizeOverride { _, _, _ -> 2 } .id("CAROUSEL") .models(imageList.map { ImageModel(it).id(it) }) …
Bradboyee
  • 28
  • 4
0
votes
2 answers

Using the Epoxy ModelView causes Inflate errors and NullPoint errors

I'm using the @ModelView annotation from the Epoxy library to create a CustomView. I'm making it with reference to another example, but the following error keeps coming up. android.view.InflateException: Binary XML file line #2 in…
ybybyb
  • 1,385
  • 1
  • 12
  • 33
0
votes
1 answer

Jetpack Paging 3.0 with Airbnb/epoxy only load the first page

I am trying to use Jetpack Paging 3.0 to get all the characters in Rick and Morty API using retrofit and display it using Airbnb/epoxy. But I only get the first page I've spent several hours trying to look for a solution but no luck. Link to…
0
votes
2 answers

Display RGB image using texture with OpenGL

I'm trying to display RGB images in a GtkGLArea using a gtk/epoxy stack in C(/C++) langage brought by vcpkg. I have no errors but the widget stay white. Can someone teel me what I'm missing ? here are the shaders: #include #include…
Cthurier
  • 28
  • 1
  • 1
  • 4
0
votes
1 answer

How do you set OnClickListenrs in your AirBNB Epoxy Models for Android (Kotlin)

So I'm using AirBNB Epoxy (the view holders version) and I can't seem to find the information where I can set onClickListeners in AirBNB Epoxy. Any information helps, Thanks.
OEThe11
  • 341
  • 2
  • 11
0
votes
1 answer

Transparent Sticky Headers

Tl;dr: Sticky recycler view headers that are also transparent seem impossible. Any wisdom would be greatly appreciated. I'm looking to build out a UI with a similar sticky header effect to the Apple Music app (example). Unfortunately this is a hard…
John McKean
  • 43
  • 2
  • 7