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

只要将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);

就行了

posted @ 2015-07-09 10:46  依凡王子  阅读(1899)  评论(0编辑  收藏  举报