Support for various controls up/down refresh Android-pulltorefresh

Source: Internet
Author: User

Android-pulltorefresh a powerful pull refresh open source project that supports drop-down refreshes of various controls, such as ListView, Viewpager, Wevview, Expandablelistview, GridView, ( Horizontal) ScrollView, fragment up or down to pull the refresh. And he realizes that the dropdown refresh ListView does not show a refresh prompt in the case of item less than one screen, the experience is good.

Characteristics
    • Direct pull-up, drop-down refresh, or directly back to the top from the bottom.

    • Slide animations to pass all the devices.

    • Supports the over scroll effect after Android 2.3 version.

    • Currently supported components:

      • Listview

      • Expandablelistview

      • Gridview

      • WebView

      • ScrollView

      • Horizontalscrollview

      • Viewpager

    • A scroll listener is integrated at the bottom of the list.

    • Support Maven.

    • There is a prompt when you can make a swipe refresh.

    • Support listfragment.

    • A lot of customizable options.

Easy to use

You can see some simple examples on Google Play.

Usage

Here is a simple tutorial to use.

Java version

Android-pulltorefresh requires version support for Java 1.6 and above. JDK1.6 the following error will be reported in this version: Run () must override a superclass method.

If you use Eclipse development, you can modify it with simple actions:

Select Project, right click, select "Properties, Java Compiler", select "Enable Project specific Settings" and select 1 in "Compiler Compliance settings" .6 or more. Click OK Press OK and then ' clean ' all of your projects.

I ' m a wrapper!

If you want to use this library, the first thing you need to know is that it encapsulates the native view class. If I can, I try not to expand and change the Android view code. So if you want to use this library, get the internal listview/gridview ... Just call Getrefreshableview () on the line.

Layout

Now you should modify the layout file:

。。。
Activity

Then add a Pulltorefresh feature to your app:

。。。

This is OK, you can see the effect in the demo.

Pull-up Refresh

The library defaults to swipe down to refresh, and if you want to pull up or support two-way operations, you can learn how to modify properties on a feature-based page.

Apps

Want to see what apps are using this library? You can take a look here.

Update Date to

If you want to see what has changed in the latest version of this library, you can go here.

Geek Label-professional and accurate sharing, focus on the geek you're interested in, community offers great boutique tutorials, interactive lectures

To learn about front-end technology, visit the Geek Interactive Course Library and code recording

Read the original: support for various controls up/down refresh Android-pulltorefresh

Support for various controls up/down refresh Android-pulltorefresh

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.