java - Android TabLayout scroll up animation with listfragment -


i have main xml set such:

<android.support.design.widget.appbarlayout     android:id="@+id/appbar"     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="?attr/colorprimary"         app:layout_scrollflags="scroll|enteralways"/>      <android.support.design.widget.tablayout         android:id="@+id/tablayout"         android:scrollbars="horizontal"         android:layout_below="@+id/toolbar"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="?attr/colorprimary" />  </android.support.design.widget.appbarlayout>  <android.support.v4.view.viewpager     android:id="@+id/tab_view_pager"     android:layout_width="match_parent"     android:layout_height="match_parent"      app:layout_behavior="@string/appbar_scrolling_view_behavior"/>  <!-- scrollable view --> <!--<include layout="@layout/cardviews"/>-->  <android.support.design.widget.floatingactionbutton     android:id="@+id/fab"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:src="@drawable/ic_note_add_white_48dp"     android:layout_marginbottom="20dp"     android:layout_marginright="20dp"     android:layout_gravity="bottom|right"     app:fabsize="normal" /> 

in tutorial following, implemented scrolling list of card views pushed tab layout when list scrolled.

however, here have view pager instead of list of card views scrolls horizontally. within pages of view pager, have list fragment contains vertical list.

yet, when scroll vertical list within view pager, tab layout not pushed up!

how nested listfragment interact tab layout.

the appbar behaves way if use nestedscrollview or recyclerview. both these classes implement nestedscrollingchild, , guess listfragment not use either of these classes list functionality.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -