how can i make both toolbar and tabLayout stay top,not scroll out of the screen
Mao-x-w opened this issue · 4 comments
Mao-x-w commented
@henrytao-me
how can i make both toolbar and tabLayout stay top,not scroll out of the screen
henrytao-me commented
Can you post your layout here?
XuanLiuNB commented
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<me.henrytao.smoothappbarlayout.SmoothAppBarLayout
android:id="@+id/smooth_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/mdSecondaryActionBarSize">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:background="@android:color/transparent"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_menu_arrow_back"
style="@style/AppStyle.MdToolbar" />
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout>
</android.support.design.widget.CoordinatorLayout>
hello, i have the same issue, in this layout ,why Toolbar cannot stay on the top ,it alway being slipped out. only TabLayout can stay.
henrytao-me commented
Hi @XuanLiuNB,
As you can see on README, this library is deprecated from Support Library 26.0.0 and later. Please use original Support Library. Thanks.
XuanLiuNB commented
thank you!