Questions tagged [staggered-gridview]

An Android staggered grid view which supports multiple columns with rows of varying sizes.

An Android staggered gridView 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 most famous example of a staggered gridview is probably the one from etsy: https://github.com/etsy/AndroidStaggeredGrid

168 questions
59
votes
3 answers

No good example about RecyclerView and StaggeredGridLayoutManager in Android Docs

I couldn't find any better example for using RecyclerView with StaggeredGridLayoutManager. Not even in Android Docs. Q1. I need some examples which can give proper explanation about how to use RecyclerView with StaggeredGridLayoutManager. Q2. Can…
Amrut Bidri
  • 5,898
  • 6
  • 31
  • 76
36
votes
6 answers

Adjust GridView child height according to the dynamic content in flutter

How to implement this complex view in the flutter? I am trying to implement a GridView with n columns and the child should be of a certain aspect ratio(say 1.3) but the height of the child should be (wrap content in Android terminology). I am stuck…
Vipul Asri
  • 7,856
  • 2
  • 41
  • 69
15
votes
2 answers

RecyclerView, StaggeredGridLayoutManager Refresh Bug

I used support library v7-21 and the RecyclerView isn't showing correctly. GridLayoutManager and LinearLayoutManager is Ok. Problem only occurs when in StaggeredGridLayoutManager I Load my DataSet and then refresh the data. Data refresh is working…
user3316557
  • 161
  • 1
  • 6
10
votes
4 answers

Stop items from moving around when using StaggeredGridLayoutManager

I'm using recyclerview with staggredGridLayoutManager in android. The problem is, sometimes when scrolling items move around to fit in the screen. Normally it's nothing to worry about but in my case it messes up everything! So is there anyway to…
Alireza A. Ahmadi
  • 4,234
  • 4
  • 36
  • 57
10
votes
4 answers

How to show banner ads intermittently in gridview

I am developing an android app that will have a screen similar to the following image - Please notice the banner ad between the cells. As GridView does not support such spanning of columns I am at a loss as to what to do. Please provide any…
Pankaj
  • 307
  • 3
  • 14
9
votes
0 answers

Contents of RecyclerView not visible when gap strategy is none

I have a RecyclerView which I use to show 2 column layout with some items as sections, using the full width. This is how I am setting up my RecyclerView: StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2,…
8
votes
5 answers

RecyclerView with StaggeredGridLayoutManager with images loading from Glide

I am having a problem showing RecyclerView with StaggeredGridLayoutManager whose item contain an imageview and the image is loaded in imageview using glide. The problem i am facing is that after images getting loaded they are not staggered and are…
6
votes
1 answer

Android StaggeredGridLayoutManager offset bug

When you clear your adapter and call notifyDataSetChanged() - StaggedGridLayoutManager manager still has mCachedStart/End in Span[] instances. So when you add new items to adapter - layout manager draws items with offset, and this is a huge…
6
votes
1 answer

Android StaggeredGridView Issue

I want GridView like pinterest, for that I have implemented StaggeredGridView lib. In that i got problem of scrolling. when i scrolling up, the top image are move to next row and top view is going to blank. I have post issue in following link with…
Pratik Butani
  • 51,868
  • 51
  • 228
  • 375
5
votes
0 answers

Lazy loading with Staggered Grid View in Flutter

How can I implement lazy loading with Staggered Grid View in Flutter. https://pub.dev/packages/flutter_staggered_grid_view is not working well by list of images. GridView.builder is working well and GridView is loading more images when scroll…
igunes
  • 51
  • 1
5
votes
0 answers

How to show an asymmetric grid of images in android

I have to show images in an asymmetric grid dynamically - setting both rowSpan(height) and colSpan(width)(Supporting Android 10+). I have tried the following approaches Approaches tried RecyclerView with GridLayoutManager With this, we can change…
5
votes
3 answers

Cells are not staggered in using RecyclerView with StaggeredGridLayoutManager in Android

I am developing an Android app. I am not good in Android development. In my app, I am using RecyclerView and CardView with StaggeredGridLayoutManager. Because I want each cell size in the list different to each other and staggered like in below…
5
votes
1 answer

Multiple number of columns in a single StaggeredGridView?

Can we have multiple number of columns in a single StaggeredGridView? For example 1 column in the first row, 3 columns in second row and 2 columns in 3rd? Actually, I want to achieve something close to the functionality of Google calendar in which…
5
votes
2 answers

StaggeredGridLayout messes up when scrolling up

I made this StaggeredGridLayout for my RecyclerView: Here's the code: @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) { Photo photo = mPhotos.get(position); TextView titleView =…
Roo
  • 553
  • 6
  • 23
5
votes
3 answers

How to find cell width from StaggeredGridLayoutManager?

I have a StaggeredGrid in a RecyclerView and I am trying to dynamically set the image height in the onBindViewHolder. I thought the StaggeredGrid was supposed to handle all this automatically, so I set android:layout_width="match_parent and…
1
2 3
11 12