@Override
protected void onRefreshing(final boolean doScroll) {
/**
* If we're not showing the Refreshing view, or the list is empty, the
* the header/footer views won't show so we use the normal method.
*/
/*ListAdapter adapter = mRefreshableView.getAdapter();
if (!mListViewExtrasEnabled || !getShowViewWhileRefreshing() || null == adapter || adapter.isEmpty()) {
super.onRefreshing(doScroll);
return;
}*/
super.onRefreshing(false);
}
}

mPullRefreshListView.setRefreshing();如果adapter是里面的size是null 或者大小是0

这个时候 setRefreshing是不会有效果的.需要将PullToRefreshListView上面代码注释掉

还有如果在下拉到底部的时候如果需要切换下拉的模式

需要 pull_to_ref_listview.onRefreshComplete();

在setData之前,不然会一直加载状态

private void setData(String ids) {
List<Goods> list = getGoods(ids);
if (list != null && list.size() > 0) {
search_layout.setVisibility(View.VISIBLE);
if (page == 1) {
adapter.updateRefrushData(list);
} else {
adapter.updateMoreData(list);
}
int size = list.size();
if (size < PAGE_SIZE) {
pull_to_ref_listview.setMode(Mode.PULL_FROM_START);
} else
{
pull_to_ref_listview.setMode(Mode.BOTH);
}
} else if (page == 1) {
mLoadingHolder.showEmpty();
} else {
pull_to_ref_listview.setMode(Mode.PULL_FROM_START);
} }

PullToRefreshListView的更多相关文章

  1. PullToRefreshListView的使用

  2. pullToRefreshListView的简单使用

    1.加入library后直接布局 library下载地址:http://pan.baidu.com/s/1dFJu8pF <com.handmark.pulltorefresh.library. ...

  3. PullToRefreshListView加载更多定位的解决方法

    之前项目里,早起用到了PullToRefreshListView,后来一部分用到了RefreshListView,最近在做优化的时候,其中一个问题就是PullToRefreshlistView上拉加载 ...

  4. RecyclerView和PullToRefreshListView的对比

    项目中上拉刷新和下拉加载一直都是比较常见的:以前一般都是重写ListView或直接用PullToRefreshListView的框架:最近尝试用RecyclerView来实现下拉加载上拉刷新也是不错的 ...

  5. ListView、PullToRefreshListView滑动加载可见item

    最近用的了PullToRefreshListView框架,也在listView中加载图片,对于滑动加载可见item,网上找了一些相关文档,但都不太合适,如:http://blog.csdn.net/z ...

  6. Android PullToRefreshListView上拉刷新和下拉刷新

    PullToRefreshListView实现上拉和下拉刷新有两个步骤: 1.设置刷新方式 pullToRefreshView.setMode(PullToRefreshBase.Mode.BOTH) ...

  7. Android ScrollView+ViewPager+PullToRefreshListView

    想达到此界面的风格 然后ViewPage里面第一个Fragment是一个瀑布流 这个瀑布流要有加载跟多 在ScrollView中,嵌套ViewPager,在ViewPager的每页使用Fragment ...

  8. PullToRefreshListView调用onRefreshComplete方法 无法取消刷新的bug

    我们在使用框架:   PullToRefreshListView 实现下拉或者上拉加载时候,可能在上拉 完成时候,调用onRefreshComplete方法去 停止 刷新操作,但是,可能无效,测试产生 ...

  9. 95秀-PullToRefreshListView 示例

        正在加载.暂无数据页面 public class RefreshGuideTool {     private RelativeLayout rl_loading_guide;//整个View ...

  10. PullToRefreshListView组件的OnItemClickListener中的position下标问题

    /** * Pass-through method for {[url=home.php?mod=space&uid=91636]@link[/url] PullToRefreshBase#g ...

随机推荐

  1. 简单易懂dubbo入门实例

    一.创建Maven多模块项目 项目结构如下 模块介绍: dubbo-api            ----API接口 dubbo-consumer ----消费者 dubbo-provider     ...

  2. JAVA 1.7并发之Fork/Join框架

    在之前的博文里有说过executor框架,其实Fork/Join就是继承executor的升级版啦 executor用于创建一个线程池,但是需要手动的添加任务,如果需要将大型任务分治,显然比较麻烦 而 ...

  3. 从生成文件对比两种创建虚拟机的方式:boot from image和boot from bootable-volume

    1. 创建bootable-volume(参考:http://docs.openstack.org/grizzly/openstack-compute/admin/content/instance-c ...

  4. 文件异步上传,多文件上传插件uploadify

    本文中使用java作为例子 uploadify下载 http://files.cnblogs.com/chyg/uploadify.zip jsp页面中需要引入: <script type=&q ...

  5. UE3优化

    转自:http://www.cnblogs.com/NEOCSL/p/3320510.html 优化问题有很多内容可讲,涉及林林总总.今天我总结一下优化注意的地方. 1.从AnimTree和Skele ...

  6. ObservableCollection和List的区别总结

    一.继承的类和接口,还有它们的方法不同 1)ObservableCollection比较简单,继承了Collection, INotifyCollectionChanged, INotifyPrope ...

  7. Ajax调用后台方法报未定义

    需要在web.config中<system.webServer>节点下添加如下内容 <handlers> <add name="ajax" verb= ...

  8. $.parseJSON失效的问题

    郁闷死,之前都是用parseJSON来解析json的,这次竟然不行了,提示parseJSON is not a function,jquery是1.72的,经过前端的帮忙,var objs = JSO ...

  9. WSGI 简介(使用python描述)

    WSGI 简介 背景 Python Web 开发中,服务端程序可以分为两个部分,一是服务器程序,二是应用程序.前者负责把客户端请求接收,整理,后者负责具体的逻辑处理.为了方便应用程序的开发,我们把常用 ...

  10. redis的 key string hash list set sorted set 常用的方法

    redis 安装文件:  http://blog.csdn.net/tangsilai/article/details/7477961 ==============================   ...