For some reasons I can't grasp, the Viewpager in the image below overflows by the size of the menu. I'm probably not picturing something but I can't see what.
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="160dp"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="wrap_content"
android:layout_height="160dp"
>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
Your ViewPager
goes out of bound because of the flag
app:layout_behavior="@string/appbar_scrolling_view_behavior"
that you've set in its XML layout. This us mainly used when you want to be able to use Google's Material Design scroll effects. If you're not interested in handling scrolls with the CoordinatorLayout
, you can just delete that line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With