Skip to content

How to support Nested horizontal recyclerview? #2

Open
VEZE opened this issue Jun 8, 2022 · 3 comments
Open

How to support Nested horizontal recyclerview? #2

VEZE opened this issue Jun 8, 2022 · 3 comments

Comments

@VEZE
Copy link

VEZE commented Jun 8, 2022

How to pass RecycledViewPool to Nested horizontal recyclerview ?

@VEZE
Copy link
Author

VEZE commented Jun 14, 2022

And how to integrate with Paging?

@Jacks0N23
Copy link
Contributor

Jacks0N23 commented Jul 3, 2022

Sorry for late response, @VEZE

For now lib doesn't provide any method for nested recycler view, I'll think about a good solution for this issue in nearest future.

But from my previous background I can recommend do something like this:

  1. Create main TiRecycler with factory(let name it MainFactory) in activity/fragment
  2. Create ViewHolder for nested recycler view
  3. Pass MainFactory to this ViewHolder(just as this in constructor)
  4. Create innerRecycelerView with this MainFactory
  5. In bind method just call innerRecycelerView.setItems()
  6. For use clicks you can pass from activity publishRelay(for rx version) and so you can bind it all in activity instead of having multiply subscriptions
  7. Also with this way you have one source of all your items for main and inner recycler in common MainFactory

@Jacks0N23
Copy link
Contributor

For paging you can use even fromendlessScrollObservable and for source where to store and get results I can recommend https://github.com/MobileNativeFoundation/Store

With paging you should use diffCallback for better experience

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants