Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript with staggered grid support. #76

Open
ckdvivedi opened this issue Nov 16, 2017 · 16 comments
Open

JavaScript with staggered grid support. #76

ckdvivedi opened this issue Nov 16, 2017 · 16 comments

Comments

@ckdvivedi
Copy link

You mentioned in document that "We built RecyclerListView which is a high performance list view written purely in JavaScript with staggered grid support."

Please provide instruction, How can I achieve staggered RecyclerListView .

@ckdvivedi
Copy link
Author

Please provide solution, How can I achieve staggered RecyclerListView .

@naqvitalha
Copy link
Collaborator

Staggered in one dimension for now. Just return relevant dimensions in layout provider and it'll work. Did you try this?

@ckdvivedi
Copy link
Author

ckdvivedi commented Nov 16, 2017

I Tried but I want staggered grid as masonry layout. ex. Pinterest. With the changes in layout provider I am not able achieve this.

Please prefer this image https://cdn-images-1.medium.com/max/2000/1*ksTMskNDTgzgt07XpmYh2w.png

@naqvitalha
Copy link
Collaborator

Masonry cannot be done with current layout manager. You can however write your own. We will be opening it up soon anyway. Would you like to?

@ckdvivedi
Copy link
Author

Sure. Thanks for your reply. I have to move another library project. BTW great library. Please provide support for masonry layout soon.

@naqvitalha
Copy link
Collaborator

Great.. We'll try to do that soon.

@hovox
Copy link

hovox commented May 8, 2018

+1 for this issue. Is there a status update for this? Could you provide steps on how to implement custom layout manager ?

@naqvitalha
Copy link
Collaborator

Check this file https://github.com/Flipkart/recyclerlistview/blob/master/src/core/layoutmanager/LayoutManager.ts
All the public methods here except getOffsetForIndex need to be implemented by you. If any of you can take it up I can go ahead and start opening up layout managers externally and provide documentation. Masonry will be a good start.

@hovox
Copy link

hovox commented May 13, 2018

Hey @naqvitalha I have created a pull request , please check and let me know, although I hove not tested it, would be good to have unit tests.

@ashokkumar88
Copy link

@ckdvivedi can u please inform which library you used for masonry?

@dwidc
Copy link

dwidc commented Jul 14, 2020

Hi, is this already solved?
I've checked #175 hasn't been merged.

Otherwise I'm planning to add masonry layout for RecyclerListView.

@raulclaudino
Copy link

Hi, is this already solved?
I've checked #175 hasn't been merged.

Otherwise I'm planning to add masonry layout for RecyclerListView.

Could you share with us?

@dwidc
Copy link

dwidc commented Jul 17, 2020

@raulclaudino It's already in pull request, #526

@raulclaudino
Copy link

@raulclaudino It's already in pull request, #526

I tried to implement, but I couldn't. The console says that the /dist folder does not exist. Need to compile this folder? Can you give me any instructions on how to run?

Thank you!

@dwidc
Copy link

dwidc commented Jul 18, 2020

@raulclaudino It's all on package.json "scripts": section.
Just run `npm run clean', and then followed by 'npm run build'.
It will build '/dist' folder.

It calls bash script so make sure you're on mac or linux or windows 10 wsl.

If you're on older windows just examine '/scripts/build.sh' and run its windows counterpart.
For example :

npx tslint 'src/**/*.{ts,tsx}'
cd src
npx file-directives REACT-NATIVE,RELEASE
cd..
npx tsc --outDir dist/reactnative

and so on.

@usrbowe
Copy link

usrbowe commented Sep 27, 2023

Would it be easy to apply LayoutManager code from MasonryList in FlashList? @naqvitalha

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

No branches or pull requests

7 participants