4

I need to create a paged GridView where each page contains some elements from a list, like launcher applications do to show the installed apps.The GridView only contains the elements that have enough space on the screen to be shown and the remaining apps are added in the GridView of the next Fragment. I've found many examples that explain how to implement this, for example http://shrikantsonarblogs.blogspot.com/2013/07/gridview-with-viewpager-like-android.html or Display images in grid view of View pager, but in all of these examples the number of rows and columns are fixed values. Is there a way to make these values "dynamic" by dividing the dimensions of the ViewPager by the dimensions of a child View (supposed they are all the same size, but I have to measure the first one)?

If what I want to achieve is not clear, an example can be the app drawer of the CyanogenMod Trebuchet launcher, with the only difference that I don't need it to display installed apps.

Community
  • 1
  • 1
Vektor88
  • 4,841
  • 11
  • 59
  • 111

0 Answers0