我想保存RecyclerView的位置,然后稍后重置.如果顶部项目只有一半可见,我可以用什么来保存这个偏移?
对于我正在使用的位置:findFirstCompletelyVisibleItemPosition()
要重置我正在使用的位置:
((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(position, offset);
Run Code Online (Sandbox Code Playgroud)
但我不确定作为偏移传递什么?