recyclerlistview
recyclerlistview copied to clipboard
Masonry layout manager and provider
Added staggered grid / masonry layout. I made this as #175 has no follow-ups.
Currently only support vertical orientation, horizontal layout is not yet implemented.
I use it by copy it to my code, but it work little strangely when load more data, it overlap the pre data.
@dwidc I find the reason. When call dataProvider.cloneWithRows method and not set firstModifiedIndex param, your relayoutFromIndex method will go wrong because the startIndex is not zero.
@Paul0523 Can you elaborate more? Maybe with some sample codes?
I never set firstModifiedIndex when calling dataProvider.cloneWithRows(), and relayoutFromIndex() works just fine.
If I remember correctly, relayoutFromIndex() can be called multiple times, and its startIndex param could be > 0.
how to include this pr to my react native project please help
Please merge/add masonry layout to this library! It would be the best thing ever 'cause there are no libraries that support infinite scroll + recycling + masonry! See also this: https://github.com/Flipkart/recyclerlistview/pull/175 @naqvitalha @muskeinsingh
when using with infinite scroll, picture can't be added? also, when using this grid, onEndReached will trigger twice?
when using with infinite scroll, picture can't be added? also, when using this grid, onEndReached will trigger twice?
Bug found, it seems that the creator forget that array starts from 0, so that the algo can't add new items after the first time, as it always finding the item with index+1
@dwidc any updates on this PR? also, can you provide us a demo to show How to use this new provider? Thank you very much!
@lclrobert2020 any update?
@lclrobert2020 any update?
I made it work a few months ago, but I forget where did I put my code, I will update a working example asap
@lclrobert2020 Thank you so much!
@lclrobert2020 Thank you so much!
https://snack.expo.dev/@robertli93/grid_example
this is my expo snack
I have uploaded a working masonrylayoutmanager to the npm but I didn't have time to write readme,
this masonrylayoutmanager is a fixed version of other people's work ( sorry i forget who and where is the original)
so credit should also give to them
there are some minor problems with the snack e.g. using UNSAFE_componentWillMount, I will write a better one if I had time
Thanks for sharing. Btw, does it support the responsive layout? I mean: on the screen-width resize how to change & redraw the item columns?
Why is it not merged yet ??
MasonryFlashList will meet your needs
Use High performance mode, have a look at https://github.com/Shopify/flash-list/issues/946#issuecomment-1972392998