An Android staggered grid view which supports multiple columns with rows of varying sizes. The StaggeredGridView was developed due to requirements for the Etsy app not met by any existing Android libraries. Namely a stable implementation with the ability to have a different number of columns in landscape & portrait, to sync grid position across orientation changes and support for headers & footers. The library was built for and tested on Android version 2.3.3(SDK 10) and above. It could be modified to support older versions if required. Configurable column count for portrait and landscape orientations. The simplest way to use AndroidStaggeredGrid is to add the library as a gradle aar dependency to your build. As column widths change on orientation change, the grid view expects that all children maintain their own width to height ratio. To assist with this the project includes the DynamicHeightImageView as an example of a view that measures its height based on its width.
Features
- Sync'd row position across orientation changes
- Configurable item margin
- Support for headers & footers
- Internal padding that does not affect the header & footer
- Supports AbsListView.OnScrollListener
- Configurable column count for portrait and landscape orientations