HeaderAndFooterRecyclerView icon indicating copy to clipboard operation
HeaderAndFooterRecyclerView copied to clipboard

加载第一页 会向上跳动 这是什么原因?

Open sunqi1006 opened this issue 8 years ago • 3 comments

sunqi1006 avatar Sep 09 '16 06:09 sunqi1006

同问!

BryceLee avatar Feb 09 '17 09:02 BryceLee

@sunqi1006 @Hellozhongxin 应该是你们在数据加载成功后调用了RecyclerViewStateUtils.setFooterViewState()方法,这方法里会调一下recyclerView.scrollToPosition(headerAndFooterAdapter.getItemCount() - 1); 把RecyclerView滑动到底部。

CodeIdeal avatar Feb 17 '17 17:02 CodeIdeal

@sunqi1006 @Hellozhongxin 可以在调用recyclerView.scrollToPosition(headerAndFooterAdapter.getItemCount() - 1);前加一个判断,如果是normal就不跳转

CodeIdeal avatar Feb 17 '17 17:02 CodeIdeal