Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
244 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...