Android 如何使用水平线性布局管理器滚动TopoPosition RecyclerView

Android 如何使用水平线性布局管理器滚动TopoPosition RecyclerView,android,android-recyclerview,horizontal-scrolling,linearlayoutmanager,Android,Android Recyclerview,Horizontal Scrolling,Linearlayoutmanager,此代码按预期工作: LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false); mRecyclerView.setLayoutManager(layoutManager); mRecyclerView.scrollToPosition(2); 定位和滚动是垂直的,显示第三项 现在,如果在上述代码中,将

此代码按预期工作:

    LinearLayoutManager layoutManager = new LinearLayoutManager(this,
            LinearLayoutManager.VERTICAL, false);
    mRecyclerView.setLayoutManager(layoutManager);
    mRecyclerView.scrollToPosition(2);
定位和滚动是垂直的,显示第三项

现在,如果在上述代码中,将垂直
替换为水平
时,项目将水平显示,滚动是水平的(如预期),但是
设置滚动位置(2)
不再起作用

如何使用
水平线布局管理器
滚动位置

我的XML文件如下所述:

< android.support.v7.widget.RecyclerView
    android:id="@+id/rvPosters"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:paddingTop="4dp"
    android:paddingBottom="4dp" >


您不能完全看到第三项?您不能完全看到第三项吗?