recyclerlistview-gridlayoutprovider
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

recyclerlistview-gridlayoutprovider

npm version travis npm License

Grid Layout Provider built on top of RecyclerListView!. Works beautifully on Android, iOS and web. Compatible with recyclerlistview version greater than 1.4.0-beta.6.

Why use GridLayoutProvider?

In cases where you are rendering a list of grids - you would have to explicitly calculate and tell the width/height of each cell. Grid Layout Provider minimises that effort for the users as it calculates the width/height based on the spans each index/type wants to consume. Tell us the type of each cell, max span that any cell can achieve and the span for each cell - we will calculate the width (in case of vertical list)/height (in case of horizontal list) for you. Do checkout our sample code to understand more.

GIF

API

It's a pretty simple and intuitive API. Grid Layout Provider needs just 4 things:

  1. Max Span
  2. Layout type for each index (similar to Layout Provider)
  3. Span for each index
  4. Width/Height for each index (width only for vertical scrollable lists and height only for horizontal scrollable lists)

Sample

Snack Sample code

Report Issues

Please raise issues here

Contributors

Muskein Singh and Talha Naqvi

Contact Us

Email us at cross-platform@flipkart.com in case of any queries

Package Sidebar

Install

npm i recyclerlistview-gridlayoutprovider

Weekly Downloads

763

Version

1.0.1

License

Apache-2.0

Unpacked Size

44.1 kB

Total Files

20

Last publish

Collaborators

  • muskeinsingh