Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

android - In the Google Play app, how is the ViewGroup showing the application top lists implemented?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...