I have my main xml set up as 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"/>
<!-- Your 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 the tutorial that I was following, they implemented a scrolling list of card views which pushed up the tab layout when the list was scrolled.
However, here I have a view pager instead of a list of card views which scrolls horizontally. Within the pages of the view pager, I have a list fragment which contains a vertical list.
Yet, when I scroll this vertical list within the view pager, the tab layout is not pushed up!
How do I get this nested listfragment to interact with the tab layout.