我已經使用回收站視圖內嵌套的滾動視圖(這是內CoordinatorLayout):嵌套循環器查看滾動發行
<android.support.v4.widget.NestedScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/sections_recycler_view_linearlayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>
在我加入兒童回收站意見編程方式使用setNestedScrollingEnabled假上述回收的適配器。
我的問題是: 當我滾動子回收站時,一旦它的滾動完成,父回收站就會滾動到頂端,就好像我正在重新設置它的適配器一樣。我沒有添加任何代碼來通知適配器或滾動到最頂級的回收站項目或再次設置適配器。我無法弄清楚這種奇怪行爲的原因。
任何幫助將不勝感激.. !!!
爲什麼你甚至需要這種結構?單個recycleview可以做同樣的事情。 – breakline
因爲我希望家長回收商在兒童回收商水平滾動時垂直滾動。家長回收員已與Collapsable Toolbar一起使用以顯示工具欄動畫,並且將在運行時決定在家長回收者視圖中有多少孩子將在那裏。 – user3492435
即使我刪除了setHasFixedSize,或者即使將其設置爲true或false,但子滾動屏幕仍會停滯。 – user3492435