Skip to content

Commit c95de33

Browse files
author
li-xiaojun
committed
update README
1 parent 0ef5c45 commit c95de33

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,59 @@ A refresh layout, can refresh RecyclerView for all LayoutManager, NestedScrollVi
3535

3636

3737

38+
3839
# Depedency
3940

41+
**Step 1. Add it in your root build.gradle at the end of repositories:**
42+
43+
```groovy
44+
allprojects {
45+
repositories {
46+
...
47+
maven { url 'https://jitpack.io' }
48+
}
49+
}
50+
```
51+
52+
**Step 2.** **Add the dependency**
53+
54+
```groovy
55+
dependencies {
56+
compile 'com.github.li-xiaojun:XRefreshLayout:1.0.0'
57+
}
58+
```
59+
60+
61+
62+
63+
64+
# Get Start
65+
66+
- set refresh listener
67+
68+
```java
69+
xrefreshLayout.setOnRefreshListener(new XRefreshLayout.OnRefreshListener() {
70+
@Override
71+
public void onRefresh() {
72+
}
73+
74+
@Override
75+
public void onLoadMore() {
76+
}
77+
});
78+
```
79+
80+
- finish refresh
4081

82+
```java
83+
xrefreshLayout.completeRefresh();
84+
```
4185

86+
- set custom loadinglayout
4287

88+
```java
89+
//you can see the DefaultLoadingLayout for some help.
90+
xrefreshLayout.setLoadingLayout(...);
91+
```
4392

93+

0 commit comments

Comments
 (0)