Android 单个布局中的Viewstub和RecyclerView

Android 单个布局中的Viewstub和RecyclerView,android,android-recyclerview,viewstub,Android,Android Recyclerview,Viewstub,我有一个recyclerview,它在列表中有20多条记录,我在布局中有一个viewstub,它通过自定义视图页面扩展了设计的底部页面视图类型。在运行时,单击按钮,我将弹出viewstub布局,然后recyclerview执行自动滚动到顶部。我已经尝试过为recyclerview和parents使用android:DegenantFocusability=“BlocksDescents”,但我也得到了同样的结果。如何防止在膨胀viewstub时自动滚动到recyclerview顶部 <Vi

我有一个recyclerview,它在列表中有20多条记录,我在布局中有一个viewstub,它通过自定义视图页面扩展了设计的底部页面视图类型。在运行时,单击按钮,我将弹出viewstub布局,然后recyclerview执行自动滚动到顶部。我已经尝试过为recyclerview和parents使用android:DegenantFocusability=“BlocksDescents”,但我也得到了同样的结果。如何防止在膨胀viewstub时自动滚动到recyclerview顶部

<ViewStub
    android:id="@+id/viewStub"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:inflatedId="@+id/viewStubTree"
    android:layout="@layout/view_attachments" />