Closed miami22 closed 3 years ago
item id and item viewtype are two very different things. To set the id you use the id
functions on the model. if you want to override the view type you can subclass you model and override getViewType
to return whatever you want - but generally with epoxy that should not be necessary
consider i want to show or hide part of element using item id inside EpoxyModelWithHolder if (id==0 || id ==1)holder.seenright.visibility=View.GONE this works at first load of carousel but when i scroll to end of carousel and come back to first , views have changed and items with specified ids havent specified properties. how can i handle this?
you should not be using item ids to control item visibility. instead models should be rebuilt and updated appropriately
solved with overriding getViewType and returning unique id. thank you
hi guys and thank you for this awesome library. i am changing my app's main page using epoxy and epoxy has perfect futures. so in regular recyclerview adapter i usually override this method to have fix item ids : override fun getItemViewType(position: Int): Int { return position } i dont know how to have epoxy carousel act the same way . im in emergency situation please help. thanks .