Questions tagged [staggeredgridlayoutmanager]
53 questions
2
votes
1 answer
How to determine viewholder is left or right in RecyclerView with StaggeredGridLayoutManager
I have read a lot of similar articles but still didnt find answer how to know view holder is left or right in RecyclerView with StaggeredGridLayoutManager.
Situation:
I have RecyclerView, StaggeredGrid and want to do padding like
8 dp [left view] 8…

Andrey Danilov
- 6,194
- 5
- 32
- 56
2
votes
0 answers
How to apply staggered grid layout horizontal with different height size
So i have to do one layout like on the image, i need to do some scroll list horizontal but with different image size height. It works perfectly with the staggered layout but only at vertical.
This is how i am initiating the…

João Nogueira
- 23
- 5
2
votes
2 answers
Staggered gridview not working properly in android
I am using staggered gridview which is placed inside NestedScrollview. I don't know y it is coming one below the other when loading for the first time(if image cache is not there). Is there any issue with staggered gridview? Or is it because of my…

svs
- 377
- 9
- 21
2
votes
1 answer
StaggeredGridLayout manager after deleting item, items gets scattered
I am using a Staggered Grid Layout to show data to recycler view from database.I have faced a problem where after deleting an item from db as well as remove position from adapter, I got some item rendering issues.Like the scattered all over the…

Avinash
- 145
- 9
1
vote
0 answers
Android. StaggeredGridLayoutManager gapStrategy makes View invisible
I use a RecyclerView to show 2 column layout with some items as sections, using the full width. This is how I am setting up my RecyclerView:
fun bindRV() {
val layoutManager = StaggeredGridLayoutManager(2, RecyclerView.VERTICAL)
…

Rafael
- 11
- 3
1
vote
1 answer
data in reverse sort order in FirestoreRecyclerAdapter using StaggeredGridLayoutManager?
I am using Firebase as a backend for my notes making Android application and using "FirestoreRecyclerAdapter" for fetching the data from it. I want that data in reverse sorted order.
How can I achieve this using the…

Sanskar Jain
- 15
- 5
1
vote
0 answers
Items get reshuffled on scrolling when using StaggeredGridLayoutManager
I'm using StaggeredGridLayoutManager with recylerview and passing a list of images in adapter. When I scroll down and then up, the order of image items gets shuffled. I googled and went through similar SO answers, suggesting setGapStrategy() to…

Khudeja
- 11
- 1
1
vote
1 answer
Android. StaggeredGridLayoutManager places the cells in the wrong position
I use a recyclerView with StaggeredGridLayoutManager. I have two columns, cells in columns can be of different heights. The items are positioned fine, however on some devices I noticed the following problem. Suppose I have a list of elements:…

testivanivan
- 967
- 13
- 36
1
vote
3 answers
Full width footer or last item in RecyclerView using StaggeredGridLayout
So this is pretty tricky. The closest thing I have found to get this working is a modified version of this answer. Where I make the last item the same height as the view I want to be full width and invisible. Then I add an itemdecoration and draw it…

just_user
- 11,769
- 19
- 90
- 135
1
vote
1 answer
StaggeredGridLayoutManager with auto-fit span count
I need a StaggeredGridLayoutManager that follows these two requirements:
Automatically calculate the number of columns based on a set minimum dp size for each column, with columns expanding to perfectly fit the available space (e.g: if I define…

PM4
- 624
- 1
- 5
- 18
1
vote
0 answers
RecyclerView with StaggeredGridLayoutManager row Height problem
I'm facing a problem with a RecyclerView with a StaggeredGridLayoutManager. The issue is that i have a two columns span but I want some full span items in the middle of the recycler. Something like this:
The problem is that empty space between the…

Federico Arrua
- 21
- 3
1
vote
1 answer
StaggeredGridLayoutManager reorders items without respecting to defined margins
I', using StaggeredGridLayoutManager for my RecyclerView in order to show items in 2 columns with equal widths but different heights. since I want equal gap between items the following ItemDecoration is being used:
public class ImageCardDecoration…

Soheil
- 587
- 4
- 20
1
vote
1 answer
Pagination with staggeredGridLayoutManager and recyclerView
Hello I need to make the infinite scrolling (Pagination) with the recyclerview using the staggeredGridLayoutManager. Pagination is working but the problem is that onLoadMore() function is called so many times while scrolling which causing problems,…

Mohammed Mokresh
- 11
- 4
1
vote
1 answer
Staggered Grid Layout behavior issue
I`m new in Android.
Could somebody help with "strange" StaggeredGridLayout behavior. GIFs attached below:
first_example_StaggeredGridLayout_behavior.gif
second_example_StaggeredGridLayout_behavior.gif
My recycler init code:
val layoutManager =…

Oleksii Vizhan
- 11
- 3
1
vote
0 answers
Set the order of items in StaggeredGridLayoutManager and RecyclerView
I'm trying to integrate a timetable into my app. At first I used a normal GridLayout, but I want to connect school subjects. So I switched to StaggeredGridLayoutManager to set different heights to the items
. Everything works, except for one thing.…

Thomas
- 11
- 4