无意间看到的好东西,mark一下
SwipeRefreshLayout 是谷歌官方下拉刷新控件,4.0以下的版本需要用到 android-support-v4.jar包才能用到
android-support-v4.jar 包下载地址:http://download.csdn.net/detail/h7870181/7784247
官网API地址:https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
GitHub Demo下载地址: https://github.com/stormzhang/SwipeRefreshLayoutDemo
常用方法:
void setOnRefreshListener(SwipeRefreshLayout.OnRefreshListener listener) 设置刷新监听器
void setColorSchemeColors(int color1, int color2, int color3, int color4) 设置四种颜色进度条样式
void setRefreshing(boolean refreshing) 隐藏或显示进度条
boolean isRefreshing() 判断进度条是否显示