bgogetap / StickyHeaders

Easily add Sticky Headers to your RecyclerView
Apache License 2.0
521 stars 88 forks source link

Sticky header on collapsing toolbar layout #103

Closed raldeskrisnu closed 3 years ago

raldeskrisnu commented 3 years ago

is sticky header support collapsing toolbar layout?

i try sticky header with collapsing header but it does'nt work as well. here is my code

`<com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/appbarlayout" android:background="@color/transparent">

    <com.google.android.material.appbar.CollapsingToolbarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_scrollFlags="scroll|snap|exitUntilCollapsed"
        android:id="@+id/collapsing_toolbar"
        app:contentScrim="@color/white">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom">

            <LinearLayout
                android:id="@+id/containerlayout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <include layout="@layout/home_info" />

            </LinearLayout>
        </FrameLayout>

    </com.google.android.material.appbar.CollapsingToolbarLayout>

</com.google.android.material.appbar.AppBarLayout>

<include
    layout="@layout/home"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    android:layout_height="wrap_content"
    android:layout_width="match_parent" />

<include layout="@layout/toolbar" app:layout_anchorGravity="top" app:layout_anchor="@+id/home" />`

the sticky header stick on CollapsingToolbarLayout not in the toolbar

raldeskrisnu commented 3 years ago

solved i tried to move to toolbar inside to CollapsingToolbarLayout Tag