Closed Chen-Sir closed 7 years ago
`<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView android:id="@android:id/list" 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="@dimen/app_bar_height">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar" app:layout_scrollFlags="scroll" app:navigationIcon="@drawable/ic_menu_arrow_back" style="@style/AppStyle.MdToolbar" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" />
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout> </android.support.design.widget.CoordinatorLayout>`
look at the code, I want the TextView to pin to the top of screen , just like the original AppBarLayout, but by your SmoothAppBarLayout , the textview also scrolls and is going to be invisible.
TextView
How to fix this problem? tks
app:layout_scrollFlags="scroll" Change scroll flag to pin
@taatu0 “pin” flag is in CollapsingToolbarLayout.
`<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView android:id="@android:id/list" 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="@dimen/app_bar_height">
</me.henrytao.smoothappbarlayout.SmoothAppBarLayout> </android.support.design.widget.CoordinatorLayout>`
look at the code, I want the
TextView
to pin to the top of screen , just like the original AppBarLayout, but by your SmoothAppBarLayout , the textview also scrolls and is going to be invisible.How to fix this problem? tks