https://github.com/junixapp/xrefreshlayout
【已过时,不再更新,请使用更强大的SmartRefreshLayout!】A refresh layout(无侵入下拉刷新和加载布局), can refresh RecyclerView for all LayoutManager, NestedScrollView。
https://github.com/junixapp/xrefreshlayout
pull-to-refresh pulltorefresh recyclerview refreshlayout refreshrecyclerview
Last synced: about 1 year ago
JSON representation
【已过时,不再更新,请使用更强大的SmartRefreshLayout!】A refresh layout(无侵入下拉刷新和加载布局), can refresh RecyclerView for all LayoutManager, NestedScrollView。
- Host: GitHub
- URL: https://github.com/junixapp/xrefreshlayout
- Owner: junixapp
- License: other
- Created: 2017-04-03T14:48:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T03:46:03.000Z (over 7 years ago)
- Last Synced: 2025-04-02T14:02:13.102Z (about 1 year ago)
- Topics: pull-to-refresh, pulltorefresh, recyclerview, refreshlayout, refreshrecyclerview
- Language: Java
- Homepage:
- Size: 9.52 MB
- Stars: 127
- Watchers: 5
- Forks: 27
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XRefreshLayout
A refresh layout, can refresh RecyclerView for all LayoutManager, NestedScrollView and Any View that implements NestedScrollChild !
# Feature
- support RecyclerView for all LayoutManager in vertical orientation !
- support NestedScrollView !
- support any view that implements NestedScrollChild !
- support custom refresh header and footer , which means you can make you wanderful animation !
- not support ListView, GridView, ScrollView !
# Screenshot
- refresh RecyclerView for StaggeredGridLayoutManager :

- refresh RecyclerView for GridLayoutManager :

- refresh RecyclerView for LinearLayoutManager :

- refresh NestedScrollView :

- custom refresh animation! There is two animation style now, I will support more animation in future...

# Gradle
```groovy
dependencies {
compile 'com.lxj:xrefreshlayout:0.0.1'
}
```
# Get Start
- make your layout
```xml
```
或者
```xml
```
- set refresh listener
```java
xrefreshLayout.setOnRefreshListener(new XRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
}
@Override
public void onLoadMore() {
}
});
```
- finish refresh
```java
xrefreshLayout.completeRefresh();
```
- set custom loadinglayout
```java
//you can see the DefaultLoadingLayout for some help.
xrefreshLayout.setLoadingLayout(...);
```