-7

Real Image

I want to create this type of layout using Recycerview.but i am gettting some issue with it.

 recyclerView.setLayoutManager(new GridLayoutManager(parentActivity, 2));

using above line ,i have display list in 2 column .but when height of some view is small then getting blank space..i want to remove that blank space.

issue screenshot:

Current Screen

Please give solution to remove that space.

dipali
  • 10,966
  • 5
  • 25
  • 51

1 Answers1

1

You can use StaggeredGridLayoutManager

  sGManager = new StaggeredGridLayoutManager(2, 1);
        recyclerView.setLayoutManager(gaggeredGridLayoutManager)

see http://inducesmile.com/android/android-staggeredgridlayoutmanager-example-tutorial/

N J
  • 27,217
  • 13
  • 76
  • 96