question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[epoxy-paging] Support building multiple models for each item

See original GitHub issue

Currently, 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:open
  • Created 5 years ago
  • Reactions:6
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ganfracommented, Oct 29, 2018

Any progress on this? I’d love to have this support 😃

1reaction
elihartcommented, Oct 9, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found