Pull To Refresh

PullToRefresh with progress bar. Simple callback!

License

License

GroupId

GroupId

me.aflak.libraries
ArtifactId

ArtifactId

pulltorefresh
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

aar
Description

Description

Pull To Refresh
PullToRefresh with progress bar. Simple callback!
Project URL

Project URL

https://github.com/omaflak/Pull-To-Refresh-Listview
Source Code Management

Source Code Management

https://github.com/omaflak/Pull-To-Refresh-Listview

Download pulltorefresh

How to add to project

<!-- https://jarcasting.com/artifacts/me.aflak.libraries/pulltorefresh/ -->
<dependency>
    <groupId>me.aflak.libraries</groupId>
    <artifactId>pulltorefresh</artifactId>
    <version>1.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/me.aflak.libraries/pulltorefresh/
implementation 'me.aflak.libraries:pulltorefresh:1.0'
// https://jarcasting.com/artifacts/me.aflak.libraries/pulltorefresh/
implementation ("me.aflak.libraries:pulltorefresh:1.0")
'me.aflak.libraries:pulltorefresh:aar:1.0'
<dependency org="me.aflak.libraries" name="pulltorefresh" rev="1.0">
  <artifact name="pulltorefresh" type="aar" />
</dependency>
@Grapes(
@Grab(group='me.aflak.libraries', module='pulltorefresh', version='1.0')
)
libraryDependencies += "me.aflak.libraries" % "pulltorefresh" % "1.0"
[me.aflak.libraries/pulltorefresh "1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 23.2.1

Project Modules

There are no modules declared in this project.

Pull To Refresh Library Download

Pull To Refresh with progress bar

Gradle

Add to your gradle dependencies:

compile 'me.aflak.libraries:pulltorefresh:1.0'

Xml Layout

<me.aflak.pulltorefresh.PullToRefresh
  android:id="@+id/pull_to_refresh"
  android:layout_width="match_parent"
  android:layout_height="match_parent">
  
  <ListView
      android:id="@+id/list"
      android:layout_width="match_parent"
      android:layout_height="match_parent"/>
	  
</me.aflak.pulltorefresh.PullToRefresh>

Java file

ListView list = (ListView)findViewById(R.id.list);
PullToRefresh ptr = (PullToRefresh) findViewById(R.id.pull_to_refresh);

ptr.setListView(list);
ptr.setOnRefreshListener(new PullToRefresh.OnRefreshListener() {
    @Override
    public void onRefresh() {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                // some stuff...
  
                ptr.refreshComplete();
            }
        });
    }
});

Versions

Version
1.0