Reference the source code to understand how Etsy implemented a variable-height grid layout before RecyclerView existed
Study the scroll-position sync logic to learn how to preserve list state across device orientation changes
Migrate an existing AndroidStaggeredGrid integration to RecyclerView with StaggeredGridLayoutManager
Deprecated since September 2015, use Android's built-in RecyclerView with StaggeredGridLayoutManager instead.
AndroidStaggeredGrid is an Android library from Etsy that displays a grid of items where each item can have a different height, similar to the layout style popularized by Pinterest. Unlike a standard Android grid where every cell is the same size, a staggered grid arranges items in columns while letting each row vary in height based on its content. The library was built because the Etsy Android app needed a stable grid implementation with specific features that no existing Android library provided at the time. The main requirements were: configurable column counts for portrait and landscape orientations, the ability to sync the scroll position when the user rotates the phone, and support for header and footer views above and below the grid. To use it, you add the StaggeredGridView component to your layout XML, set options like the number of columns and the spacing between items, and attach a standard Android list adapter. The grid handles the layout from there. The README notes that all item views should maintain their own width-to-height ratio as column widths change on rotation, and includes a sample image view class that does this automatically. The README prominently notes that this library was deprecated in September 2015 and is no longer maintained. The authors recommend using Google's own RecyclerView with its StaggeredGridLayoutManager instead, which provides the same layout style with ongoing support. The Etsy team moved to that solution internally as well. For anyone who still needs to reference the code, it is available under the Apache 2.0 license. It targets Android 2.3.3 and above and uses Gradle for building.
← etsy on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.