码迷,mamicode.com
首页 > 其他好文 > 详细

PullToRefreshListView插件初次进入页面自动刷新

时间:2015-07-09 11:07:30      阅读:468      评论:0      收藏:0      [点我收藏+]

标签:

只要将PullToRefreshListView源码中的:

@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;

// }

下面注释的部分注释掉再在想刷新的地方加上:

mPullToRefreshListView.setRefreshing(true);

就行了

PullToRefreshListView插件初次进入页面自动刷新

标签:

原文地址:http://www.cnblogs.com/zhengjunfei/p/4632465.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!