4

How would you implement a layout with multiple columns, where the rows of each column don't line up? I'm thinking of something like:

----------
|  |  |  |
|  |  |  |
|--|  |  |
|  |--|  |
|--|  |--|
|  |--|  |

...

And so on. An example of something like this is a website like Pinterest.

I'm looking for best practices here from experienced Android devs. Does it make sense to use multiple ListViews and keep them in sync somehow? Is there a better way?

4

2 回答 2

5

有一个新的开发正在进行StaggeredGridView,请参阅这个项目:https ://github.com/maurycyw/StaggeredGridView (通过androidviews.net)。这很像 Pinterest 应用程序布局。

于 2013-01-16T10:40:02.900 回答
-1

使用GridLayout,

http://developer.android.com/reference/android/widget/GridLayout.html

并将其放入 aScrollView中,

http://developer.android.com/reference/android/widget/ScrollView.html

于 2012-04-06T13:52:56.360 回答