Open KennethYo opened 8 years ago
可以自己实现,参考http://www.cnblogs.com/july2012/p/4081929.html
public void refresh() {
//先回到顶部,再刷新
mListView.smoothScrollToPositionFromTop(0, 0, 200);
mPullListView.postDelayed(() -> {
mListView.setSelection(0);
mPullListView.autoRefresh(false);
}, 200);
}
如果
ListView
滑动到中间,手动调用autoRefresh
,ListView
并不会回到顶部,在执行刷新动作。