一个轻量下拉刷新上拉加载更多控件,已封装ListView
###Gradle
dependencies{
compile 'com.xw.repo:PullToRefresh:2.1@aar'
}
###自定义资源(Customize Resources)
// customize here
ResourceConfig resourceConfig = new ResourceConfig() {
@Override
public int[] configImageResIds() {
return new int[]{R.mipmap.ic_arrow, R.mipmap.ic_ok,
R.mipmap.ic_failed, R.mipmap.ic_ok, R.mipmap.ic_failed};
}
@Override
public int[] configTextResIds() {
return new int[]{
R.string.pull_to_refresh, R.string.release_to_refresh,
R.string.refreshing, R.string.refresh_succeeded,
R.string.refresh_failed, R.string.pull_up_to_load,
R.string.release_to_load, R.string.loading,
R.string.load_succeeded, R.string.load_failed};
}
};
mRefreshLayout.setResourceConfig(resourceConfig);
###Thanks ####PullToRefreshAndLoad