[epoxy-paging] Support building multiple models for each item
See original GitHub issueCurrently, PagedListEpoxyController
allows you to return one EpoxyModel<*>
per item
, as enforced by this method:
abstract fun buildItemModel(currentPosition: Int, item: T?): EpoxyModel<*>
This prevents an item from being “split up” or multiplexed into multiple models.
Introducing support for this would be perfect for an “endless scrolling feed” like use case. We’d need to figure out how to accurately report back the number of models, and to map an item to a model.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Advanced entry script authoring - Azure - Microsoft Learn
Learn how to write Azure Machine Learning entry scripts for pre- and post-processing during deployment.
Read more >Host multiple models in one container behind one endpoint
Create an endpoint that can host multiple Amazon SageMaker models to help reduce cost. ... Multi-model endpoints support all of the CPU instance...
Read more >com.airbnb.android:epoxy-paging: Docs & Community
These models are then used in an EpoxyController to declare what items to show ... and more, in order to simplify building screens...
Read more >The Ultimate Guide to Evaluation and Selection of Models in ...
supports TensorFlow 2, lets you employ state of the art model architectures for object detection, gives you a simple way to configure models....
Read more >Should I Train a Model for Each Customer or Use One Model ...
This means that any of our machine learning features should work properly for many different customers that each one of them has a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any progress on this? I’d love to have this support 😃
I don’t mind changing the API, especially if it is not a hard thing for people to adjust to when they upgrade.
The multiplexed model is interesting - but I am hesitant because it doesn’t create a clear delineation of usage within the paged controller. Also models are complex and nesting them can lead to all sorts of other issues to solve (what does setting an onBind listener on the model do, what does the parent model id do, etc )
I like yigit’s ideas to solve it entirely within the paged controller. I would vote for breaking backwards compatibility however we need to create an ideal API for this going forward. Although the ideas for how to support backwards compatibility (with a default implementation) also sound reasonable to me - nothing stands out as being best.
The idea of returning a list of models to map to an item in the list makes sense. But I’m not clear on what you mean by using an instance map and reusing the same model in multiple places? The model doesn’t really hold state when bound, so it should be fine to reuse it, but it needs to have a unique id.