Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lumenghz/PullToRefresh
A PullToRefresh widget.
https://github.com/lumenghz/PullToRefresh
android pulltorefresh
Last synced: 3 months ago
JSON representation
A PullToRefresh widget.
- Host: GitHub
- URL: https://github.com/lumenghz/PullToRefresh
- Owner: lumenghz
- License: mit
- Archived: true
- Created: 2016-06-17T03:20:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T15:03:22.000Z (over 7 years ago)
- Last Synced: 2024-05-22T06:11:14.274Z (6 months ago)
- Topics: android, pulltorefresh
- Language: Java
- Homepage:
- Size: 4.08 MB
- Stars: 508
- Watchers: 9
- Forks: 77
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - PullToRefresh - 下拉刷新实现 (下拉刷新)
README
## PullLaunchRocket
[中文文档](./README_CHN.md)
[![License](https://img.shields.io/github/license/lubeast/PullLaunchRocket.svg?style=flat-square)](https://github.com/lubeast/PullLaunchRocket/blob/master/LICENSE)
[![Travis](https://img.shields.io/travis/lubeast/PullToRefresh/master.svg?style=flat-square)](https://travis-ci.org/lubeast/PullToRefresh)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PullToRefresh-brightgreen.svg?style=flat-square)](https://android-arsenal.com/details/1/3943)
[![Github Issues](https://img.shields.io/github/issues/lubeast/PullLaunchRocket.svg?style=flat-square)](https://github.com/lubeast/PullToRefresh/issues)You guys can see [another project](https://github.com/lubeast/AlphaLayout) depends on this one.
Thanks to [Yalantis](https://github.com/Yalantis) for creating a great logic of `PullToRefresh`. And that's logic is the fundation of `PullLaunchRocket` also.
Give me a `Star` please :D And welcome to contact me or make a PR if you have any good style, we make it better together.
We use Launch-Rocket as our default style.
![rocket](https://raw.github.com/lubeast/PullLaunchRocket/master/screenshots/rocket.gif)
And also, we provided a custom refresh style - sunrise
![rocket](https://raw.github.com/lubeast/PullLaunchRocket/master/screenshots/sunraise.gif)
**Attention : **
version 1.0.2 is just a pre-release.### Usage
*You can have a look at Sample Project* `sample` for better use.
- Add it in your root `build.gradle` at the end of repositories:
```groovy
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```- Add the dependency in your module-level `build.gradle`
```groovy
dependencies {
compile 'com.github.lubeast:PullToRefresh:1.0.2'
}
```- `PullToRefreshView` widget in your layout.xml
```xml
```
- Initial the `PullToRefreshView` and setup `OnRefreshListener` in your `onCreate` method
```java
mPullToRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
@Override
public void onRefresh() {
mPullToRefreshView.postDelayed(new Runnable() {
@Override
public void run() {
mPullToRefreshView.setRefreshing(false);
}
}, REFRESH_DELAY);
}
});
```- You can change refresh state through call
```java
mPullToRefreshView.setRefreshing(boolean isRefreshing)
```