![](http://dl2.iteye.com/upload/attachment/0104/1842/fc99168b-ec43-3533-a6da-fa4625757464.png)
![](http://dl2.iteye.com/upload/attachment/0104/1844/8f206b4b-22d7-3a2e-a258-0b5e989e6b1e.jpg)
简介
简单方便下拉上拉刷新库,Demo中只在Listview中做了使用,原项目使用很灵活,可以在Gridview,Webview,ViewPager,Fragment中使用。
代码
说下常用的几个主要方法
1.setMode() 定义刷新模式
DISABLED(0x0) 禁止通过手势和手动执行
PULL_FROM_START(0x1) 可执行下拉刷新
PULL_FROM_END(0x2) 可执行上拉刷新
BOTH(0x3) 上下都可执行
MANUAL_REFRESH_ONLY(0x4) 禁止通过手势执行,但可以手动设置
2.setScrollingWhileRefreshingEnabled() 数据加载中是否允许滑动
3.setRefreshing() 改变刷新状态
4.如想改变样式,打开library中的com.handmark.pulltorefresh.library.internal.LoadingLayout.java从新定义