Pinterestlikeadapterview
Project Address: Https://github.com/GDG-Korea/PinterestLikeAdapterView
Using a method similar to a ListView the following is a simple application that I use to implement a display system picture:
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <Mergexmlns:android= "Http://schemas.android.com/apk/res/android"3 Android:layout_width= "Match_parent"4 Android:layout_height= "Match_parent"5 Android:background= "#000000"6 >7 <Com.huewu.pla.lib.MultiColumnListView8 Xmlns:pla= "Http://schemas.android.com/apk/res-auto"9 Android:background= "#000000"Ten Android:id= "@+id/list" One Android:layout_width= "Match_parent" A Android:layout_height= "Match_parent" - Pla:placolumnnumber= "3" - Pla:plalandscapecolumnnumber= "3" the > - </Com.huewu.pla.lib.MultiColumnListView> - </Merge>
plaColumnNumber
Indicates how many columns are plaLandscapeColumnNumber
displayed, indicating how many columns are displayed under a horizontal screen.
But unlike Staggeredgridview, he does not provide an attribute to set the gap size between item, which can be resolved by setting a padding in the XML of the item.
There is also the official demo demo, but he just used TextView to achieve the Pinterest interleaving effect, which is much simpler than the picture, because TextView only need to set different lengths of strings to get different heights of the item.
I give the example just realize the Pinterest interleaving effect, in fact, waterfall flow is often loaded with pull more features, here is a sub-function of the source: http://download.csdn.net/detail/xiangxue336/7059861
and Http://pan.baidu.com/s/1dDy8OUH
Original address: http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/0919/1696.html
[The best waterfall flow control in]android Pinterestlikeadapterview