henrytao-me / smooth-app-bar-layout

Smooth version of Google Support Design AppBarLayout
Apache License 2.0
1.77k stars 240 forks source link

I imitate SmoothViewPagerParallaxExitUntilCollapsedActivity interface, overall structure of this project is viewpager + fragemment structure, but when I RecyclerView exist head when sliding to the top To be placed at the top, now in your control will slide out, what reason be? #215

Open jason12193 opened 6 years ago

jason12193 commented 6 years ago

I imitate SmoothViewPagerParallaxExitUntilCollapsedActivity interface, overall structure of this project is viewpager + fragemment structure, but when I RecyclerView exist head when sliding to the top To be placed at the top, now in your control will slide out, what reason be?

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    **<!--

Demand: this is the head, and as it slides up to the top you can't slide it out and now it's going to go out-->

    <LinearLayout
        android:orientation="vertical"
        android:id="@+id/head_Sliding_set_top"
        android:layout_width="match_parent"
        android:layout_height="50dp">

    </LinearLayout>**

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />
</LinearLayout>

<me.henrytao.smoothappbarlayout.widget.NestedScrollView
    android:id="@+id/nested_scroll_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:visibility="gone">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp"
        android:visibility="visible">

        <include
            android:id="@+id/item_pager_header_spacing"
            layout="@layout/item_pager_header_spacing" />

        <include
            android:id="@+id/item_header_view_pager_parallax_spacing"
            layout="@layout/item_header_view_pager_parallax_spacing" />

        <TextView
            android:id="@+id/text"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="@string/text_long" />
    </LinearLayout>
</me.henrytao.smoothappbarlayout.widget.NestedScrollView>