7

The Google Play application presents the top lists of different categories in a GridView-like way (screenshot). I'm pretty sure that it's not a standard GridView, since when I scroll all the way to the bottom, it shows a screen-wide "Loading" item, which is not possible with standard GridViews to my knowledge.

Can I find the code for this ViewGroup somewhere? If not what would be the best way to implement such a ViewGroup? I was thinking about handling this with ListView, but it'd require a quite messy adapter that puts multiple list-items in a single row, according to the screen-width available.

Zsombor Erdődy-Nagy
  • 16,864
  • 16
  • 76
  • 101

1 Answers1

17

To answer my own question:

I disassembled the Google Play app and found that they're using simple ListView here, with a BucketListAdapter. This adapter presents the list-elements in a GridView-like way, splitting them to columns. This way they could also use list footers and headers.

I've rolled my own implementation of this, if anyone's interested, it can be found here: https://github.com/rzsombor/bucket-list-adapter. It's still working in progress stuff however.

Zsombor Erdődy-Nagy
  • 16,864
  • 16
  • 76
  • 101
  • Thanks for open sourcing the code for bucket list adapter. It really gets things done and very useful. But there are optimization issues. The adapter does not use recycling of views. Neither does it use the viewHolder pattern. So, it is very likely that the app will go out of memory if the number of items in list goes high. Also, the rendering of the items is very slow and the scrolling is not much smooth. We need to work on it to optimize it. – Hemant G Feb 26 '13 at 11:54