How can I use stickyHeader in NestedScrollView??
See original GitHub issueStickyHeader 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:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
@tprochazka just for completeness - that problem is solved when you assign the recycler view a fixed height (or width).