Android StaggeredGridView Issue
Asked Answered
B

1

6

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 image.

Stuck with this Issue of StaggeredGridView

Note:

If i fixed height of ImageView, Its works perfectly but not getting that view which i want.

How can i fix this problem.?

Image

Your Help would be appreciated.

Brewington answered 5/3, 2014 at 5:25 Comment(0)
C
1

Its been long to answer this but now Recyclerview Supports different layoutmanager so for using staggered with recyclerview just use below code:-

 rcyclerview.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));

And if you want to add this as your header then on bindviewholder in your header part set below code :-

 StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
        layoutParams.setFullSpan(true);
Cockscomb answered 19/1, 2016 at 9:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.