CollapsingToolbarLayout
の下のコンテンツをすばやく(上下に)スクロールすると、CollapsingToolbarLayout
が半開状態になるという問題が発生しています。CollapsingToolbarLayoutがSwipeRefreshLayoutの下でときどき表示されません。
つまり、RecyclerView(上または下)をすばやくスワイプすると、CollapsingToolbarがハングオープン状態になってCollapsingToolbarがつまったりジャムしたりします。
私はCollapsingToolbarLayout
の下にSwipeRefreshLayout
があります。 android.support.v4.widget.SwipeRefreshLayout
にはandroid.support.v7.widget.RecyclerView
が含まれています。 collapsingToolbarLayoutはプログラムによって追加されます。 SwipeRefreshLayout
RecyclerView
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
CollapsingToolbarLayoutのparamsの一部
final AppBarLayout.LayoutParams params = new AppBarLayout.LayoutParams(AppBarLayout.LayoutParams.MATCH_PARENT, AppBarLayout.LayoutParams.MATCH_PARENT);
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED);
誰もがこの問題を経験し、それを解決する方法を知っている場合、私は疑問に思って。