question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I use stickyHeader in NestedScrollView??

See original GitHub issue

StickyHeader doesnot work in NestedScrollView. because of stickyHeader cannot recevie onScrolled() listener. How can I use stickyHeader in NestedScrollView??

xml code
<android.support.v4.widget.NestedScrollView
        android:id="@+id/scroll_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:listitem="@layout/recycler_expandable_item"/>
        <include layout="@layout/sticky_header_layout"/>
    </FrameLayout>
</android.support.v4.widget.NestedScrollView>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dhingrapcommented, Jul 25, 2017

@i-schuetz I’m using following library for sticky header with recyclerView https://github.com/TellH/RecyclerStickyHeaderView/blob/master/README.md

and I’m also facing the issue of nesting stickyHeaderView with NestedScrollView.In this case headers are not getting sticked.I have to use NestedScrollView because in my UI we have appbar layout over recyclerView.Your help will be really appreciated if you have find any solution for this.I have tried fixed the height of recyclerView but that didn’t fix the problem.

1reaction
ivanschuetzcommented, Jun 29, 2017

@tprochazka just for completeness - that problem is solved when you assign the recycler view a fixed height (or width).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make one of child view of nestedscrollview to sticky ...
The commented tablayout should work as a sticky header(meaning it should not scroll when it reaches to top while scrolling).How to achive this ......
Read more >
Sticky bar in Android | Sticky Header in Android - YouTube
This video elaborates of implementing sticky header and footer in ScrollView with example. the information of library used in the Program is ...
Read more >
Sticky ScrollView - Medium
It's called StickyScrollView. StickyScrollView provides both sticky header as well as sticky footer. Sticky Header & Footer with android scrollView.
Read more >
didikk / sticky-nestedscrollview Download - JitPack
Add android:tag="sticky" to your desired view. <me.didik.component.StickyNestedScrollView xmlns:android="http ...
Read more >
Using React Native ScrollView to create a sticky header
The onScroll prop is particularly relevant to this sticky header tutorial. onScroll allows you to define an action that is to be executed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found