Blank header issue when change tab
rahuldevanavar91 opened this issue · 2 comments
rahuldevanavar91 commented
Hi
I am using following code , I am facing issue that when I change the blank header is showing .
`
<include
android:id="@+id/tool_bar_generic"
layout="@layout/tool_bar" />
<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">
<com.manash.purplle.helper.NonSwappableViewPager
android:id="@+id/find_my_fit_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<me.henrytao.smoothappbarlayout.SmoothAppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/_40dp">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout
android:id="@+id/header_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.manash.purplle.helper.PurplleTextView
android:id="@+id/title"
style="@style/body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/_15dp"
android:layout_marginLeft="@dimen/_20dp"
android:layout_marginRight="@dimen/_20dp"
android:textSize="@dimen/_24dp"
android:visibility="gone" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/_1dp"
android:background="@color/line_color" />
</LinearLayout>
</android.support.design.widget.CollapsingToolbarLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/_40dp"
android:background="@color/white"
android:visibility="visible"
app:tabIndicatorHeight="0dp"
app:tabMode="scrollable"
app:tabPaddingEnd="0dp"
app:tabPaddingStart="0dp"
app:tabSelectedTextColor="@color/silver"
app:tabTextColor="@color/black" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/_1dp"
android:background="@color/line_color" />
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
<com.manash.purpllesalon.helper.MaterialProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
<LinearLayout
android:id="@+id/network_error_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?android:actionBarSize"
android:orientation="vertical"
android:visibility="gone" />
</android.support.design.widget.CoordinatorLayout>
`
henrytao-me commented
Sorry for late response. Let me take a look
henrytao-me commented
This example is quite closed to what you want to do. Please check. https://github.com/henrytao-me/smooth-app-bar-layout/blob/master/sample/src/main/res/layout/activity_smooth_view_pager_exit_util_collapsed.xml
Also note that: adding Toolbar outside CoordinatorLayout does not seem correct to me.