DEPRECATED This project aims to provide a reusable pull to refresh widget for Android.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Pull To Refresh for Android

Note This library is deprecated, a swipe refresh layout is available in the v4 support library.

This project aims to provide a reusable pull to refresh widget for Android.


Repository at



  The PullToRefreshListView replaces a standard ListView widget.


// Set a listener to be invoked when the list should be refreshed.
((PullToRefreshListView) getListView()).setOnRefreshListener(new OnRefreshListener() {
    public void onRefresh() {
        // Do work to refresh the list here.
        new GetDataTask().execute();

private class GetDataTask extends AsyncTask<Void, Void, String[]> {
    protected void onPostExecute(String[] result) {
        mListItems.addFirst("Added after refresh...");
        // Call onRefreshComplete when the list has been refreshed.
        ((PullToRefreshListView) getListView()).onRefreshComplete();

Last Updated

It's possible to add a last updated time using the method setLastUpdated and onRefreshComplete. The text provided to these methods will be set below the Release to refresh text. Note that the time representation is not validated replaces the previous text, which means that it's possible and recommended to add a text similar to "Last Update: 15:23". This might be changed in future versions.

1.5 Support

To use the widget on 1.5 the necessary drawables needs to be copied to that projects drawable folder. The drawables needed by the widget can be found in the drawable-hdpi folder in the library project.


Are you using this widget?

If you are using this widget please feel free to add your app to the wiki.


Copyright (c) 2011 Johan Nilsson

Licensed under the Apache License, Version 2.0