coordinatorlayout work with recyclerview 'A' and another recyclerview 'B' in recyclerview 'A'. recyclerview 'B' as a item in recyclerview 'A'
See above images.
If scroll UI start from 'Part A' . It's ok. Toolbar hide or show.
If scroll UI start from 'Part RecyclerView'. Toolbar's stuck.
Why???
Edit01 :
<android.support.design.widget.AppBarLayout android:id="@+id/appbar_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="#fefefe" android:minHeight="?attr/actionBarSize" app:contentInsetLeft="0dp" app:contentInsetStart="0dp" app:layout_scrollFlags="scroll|enterAlways"> <!-- custom layout --> </android.support.v7.widget.Toolbar> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="none" app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
ViewPager contains Fragment , and the Fragment contains RecyclerView. Let's show you the item of RecyclerView
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content">
// Part A
<RelativeLayout android:id="@+id/rl_artist_info" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/item_card_artist_margin"> </RelativeLayout> //Part RecyclerView <android.support.v7.widget.RecyclerView android:id="@+id/rv_artist_product" android:layout_width="match_parent" android:layout_height="@dimen/item_card_artist_products_height" android:layout_below="@id/rl_artist_info" android:scrollbars="none"/> </RelativeLayout>
If scroll UI start from 'Part A' . It's ok. Toolbar hide or show.
If scroll UI start from 'Part RecyclerView'. Toolbar's stuck.