I\'ve been playing around with the Design Support Library and have come across a little problem that I hope someone can help me out with.
I\'m using a CollapsingTool
You should remove the NestedScrollView
and LinearLayout
levels between your CoordinatorLayout
and ViewPager
:
<android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.AppBarLayout>
...
</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:background="@android:color/white"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
The view with app:layout_behavior="@string/appbar_scrolling_view_behavior
must be a direct child of CoordinatorLayout
to be positioned correctly in relation to the AppBarLayout
.