<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">如果您使用的是LinearLayoutManager或StaggeredGridLayoutManager,它们都有一个scrollToPositionWithOffset(int position,int offset)方法,第一个参数是item的position值,第二个参数是第一个参数对应的item距离RecyclerView的顶部(Top)的距离(px);</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">例如</span>
<span style="font-family: Arial, Helvetica, sans-serif;">//Scroll item 2 to 20 pixels from the top</span>
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);"></span><pre name="code" class="java">linearLayoutManager.scrollToPositionWithOffset(2, 20);