android-PullRefreshLayout
=========================
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-android--PullRefreshLayout-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1084)
This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout.
# Demo
<p>
<img src="https://raw.githubusercontent.com/baoyongzhang/android-PullRefreshLayout/master/demo.gif" width="320" alt="Screenshot"/>
</p>
# Usage
Add dependency.
```
dependencies {
compile 'com.baoyz.pullrefreshlayout:library:1.0.1'
}
```
Use method like SwipeRefreshLayout's usage.
Use it in your layout xml.
```xml
<com.baoyz.widget.PullRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- ListView、ScrollView、RecyclerView、Other -->
</com.baoyz.widget.PullRefreshLayout>
```
Get instance and use it.
```java
PullRefreshLayout layout = (PullRefreshLayout) findViewById(...);
// listen refresh event
layout.setOnRefreshListener(new PullRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
// start refresh
}
});
// refresh complete
layout.setRefreshing(false);
```
Change the refresh style, there are four styles of use, `MATERIAL`、`CIRCLES`、 `WATER_DROP` and `RING`.
In java, call `setRefreshStyle` method.
```java
layout.setRefreshStyle(PullRefreshLayout.STYLE_CIRCLES);
```
In xml, use attributes.
```xml
<com.baoyz.widget.PullRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:type="water_drop">
</com.baoyz.widget.PullRefreshLayout>
```
Change the color scheme.
In java, call `setColorSchemeColors` method. The int array length must be 4.
```java
layout.setColorSchemeColors(int []);
```
In xml, use attributes.
```xml
<com.baoyz.widget.PullRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:colors="@array/scheme_colors">
</com.baoyz.widget.PullRefreshLayout>
```
# Thanks
* [SwipeRefreshLayout](https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html)
* [GoogleProgressBar](https://github.com/jpardogo/GoogleProgressBar)
License
=======
The MIT License (MIT)
Copyright (c) 2014 baoyongzhang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
没有合适的资源?快使用搜索试试~ 我知道了~
android-PullRefreshLayout
共44个文件
xml:14个
java:11个
png:4个
5星 · 超过95%的资源 需积分: 16 89 下载量 95 浏览量
2015-07-06
17:37:41
上传
评论
收藏 1007KB ZIP 举报
温馨提示
详情:http://blog.csdn.net/onceing/article/details/46777189
资源推荐
资源详情
资源评论
收起资源包目录
android-PullRefreshLayout-master.zip (44个子文件)
android-PullRefreshLayout-master
gradlew.bat 2KB
gradlew 5KB
sample
proguard-rules.pro 665B
src
androidTest
java
com
baoyz
pullrefreshlayout
sample
ApplicationTest.java 365B
main
res
menu
demo.xml 780B
drawable-hdpi
ic_launcher.png 9KB
drawable-xhdpi
ic_launcher.png 14KB
drawable-xxhdpi
ic_launcher.png 19KB
values
colors.xml 222B
strings.xml 311B
styles.xml 197B
dimens.xml 211B
drawable-mdpi
ic_launcher.png 5KB
layout
activity_recycler_view.xml 727B
activity_demo.xml 637B
values-v21
styles.xml 143B
values-w820dp
dimens.xml 358B
java
com
baoyz
pullrefreshlayout
sample
RecyclerViewActivity.java 3KB
DemoActivity.java 3KB
AndroidManifest.xml 736B
.gitignore 7B
build.gradle 686B
demo.gif 1.05MB
library
proguard-rules.pro 665B
src
androidTest
java
com
baoyz
widget
ApplicationTest.java 347B
main
res
values
colors.xml 229B
strings.xml 222B
attrs.xml 428B
java
com
baoyz
widget
RingDrawable.java 5KB
RefreshDrawable.java 2KB
WaterDropDrawable.java 5KB
MaterialDrawable.java 28KB
CirclesDrawable.java 8KB
ArcDrawable.java 4KB
PullRefreshLayout.java 18KB
AndroidManifest.xml 153B
.gitignore 7B
build.gradle 534B
LICENSE 1KB
gradle
wrapper
gradle-wrapper.jar 49KB
.gitignore 661B
README.md 3KB
settings.gradle 30B
build.gradle 436B
共 44 条
- 1
资源评论
- qq_270271472015-11-08很不错的东西 学习了!!!
- qiaoranzhifeng2019-01-05可以,很好的东西
Angus博客
- 粉丝: 555
- 资源: 58
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功