1

I want to create GridView same like google's play(show below image). I search on this and also refer this question but still not find any solution.

I have tried StaggeredGridView but in this it will create problem while orientation changes. I had also tried with Override onConfigurationChanged and in that gridView.invalidate(); and adapter.notifyDataSetInvalidated();But still getting problem.

The Problem is, if I load application in landscape mode and load images and at the time of loading images if I change the orientation then there will be a Gap shown in GridView.

Any one has any idea related to this then please share with me.

enter image description here

Community
  • 1
  • 1
anddev
  • 3,144
  • 12
  • 39
  • 70

1 Answers1

4

I suggest you to use this which allows user to create a GridView with uneven rows similar to how looks like Pinterest,GooglePlay's gridview .

It also Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.

If you already used the StaggeredGridView, then there is also one more library which works the same just you want and also look at this solution .

I hope this serve your purpose.

Hope this helps ... :)

Community
  • 1
  • 1
AndroidLearner
  • 4,500
  • 4
  • 31
  • 62
  • Thanks for answer but I already tried this and as I mentioned in my question it will create problem while orientation change. – anddev Jun 27 '13 at 06:10
  • Hey I also tried this but I want only grideview in which I can pass NumColums dynamically because it changes while orientation changes. – anddev Jun 27 '13 at 06:28