Waterfall flow, pull down refresh, pull up load more

Source: Internet
Author: User

Foreword: Because the project needs, the manager calls me to do a waterfall flow view, has looked for several current mainstream waterfall flow solution on the net. Finally, the respective solutions were studied, and I chose the stageredgridview. We can find it on the GitHub. But in the end, I found that it is inconvenient to use Stageredgridview to pull down and load more, and Stageredgridview is not perfect in many functions. After thinking over and over, I still found a breakthrough in the Stageredgridview.

Goal: As a result of Drop-down refresh, pull load more, online has been a lot of related solutions, I studied these solutions, found a common ground, are in the ListView, the GridView, ScrollView on the deal. Including the current GitHub on a project called Pulltorefresh, can be used directly in ListView, GridView, ScrollView, in the Stageredgridview is not applicable. Think for a moment, if you can do a control like this, arbitrary view (such as: LinearLayout,) placed in it, can be very convenient to achieve this function, that should be much better. I think a set of solutions, I hope that we can discuss, advice.

Solution: In a relativelayout, put 5 layouts first (of course it can be arbitrary, I choose linearlayout). As shown in the following illustration:


Under such a scheme, I tested the stageredgridview,srcollview separately. can achieve the desired effect, because the project is not too tight to test other views, this is what I took out the purpose of discussion, I hope that we can improve together.

Instance effect: Below is my test Stageredgridview's effect.

Initialize interface


In the process of pulling down

Hints can be updated

In the update

Hint Pull up load

Release load More

In load

You can also drag left

You can also drag right


Source: Resource

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.