[The best waterfall flow control in]android Pinterestlikeadapterview

Source: Internet
Author: User

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>

plaColumnNumberIndicates 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.