liaohuqiu / android-Ultra-Pull-To-Refresh

Ultra Pull to Refresh for Android. Support all the views.
MIT License
9.58k stars 2.66k forks source link

ListView 不会回到顶部 #249

Open KennethYo opened 8 years ago

KennethYo commented 8 years ago

如果 ListView滑动到中间,手动调用autoRefreshListView并不会回到顶部,在执行刷新动作。

van048 commented 8 years ago

可以自己实现,参考http://www.cnblogs.com/july2012/p/4081929.html

VectorWen commented 7 years ago
 public void refresh() {
       //先回到顶部,再刷新
        mListView.smoothScrollToPositionFromTop(0, 0, 200);
        mPullListView.postDelayed(() -> {
            mListView.setSelection(0);
            mPullListView.autoRefresh(false);
        }, 200);
    }