Skip to content

ListView Grid/Custom Layouts #1276

@yelled3

Description

@yelled3

I was looking into ListView docs and wanted to learn how to render different kind of layouts (aside from a simple table rows layout)
this seems like a fairly common use case for native apps.

I'm aware of https://github.com/lucholaf/react-native-grid-view but I think this is not the way to go and it still bounds you to a row layout (with more cells per row)

the only other reference I found was:
http://stackoverflow.com/questions/29394297/listview-grid-in-react-native/29395686#29395686

which looks like a good starting point.
I was thinking maybe there's a way to implement an equivalent to UICollectionViewFlowLayout
or a custom UICollectionViewLayout which will allow for more flexible layouts, such as Pinterest-like layouts.

i'm not 100% about a good interface for this, perhaps something like:

var listViewLayout = GridLayout(cellSize, cellSpacing)
<ListView layout=listViewLayout   .../>

or maybe just subclass ListView with GridListView which does about the same internally.

thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions