Support sticky header for scroll view
See original GitHub issueReact native supports stickyHeaderIndices for scroll view.
When <view scroll="true"> we can support multiple <sticky-header target="..." /> as children where target attribute references the view we want to make sticky.
Example
<view scroll="true">
<sticky-header target="view-1" />
<sticky-header target="view-3" />
<view id="view-0">
<text style="Text">Non Sticky</text>
</view>
<view id="view-1">
<text style="Text">Sticky</text>
</view>
<view id="view-2">
<text style="Text">Non Sticky</text>
</view>
<view id="view-3">
<text style="Text">Sticky</text>
</view>
</view>
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Using React Native ScrollView to create a sticky header
Create a custom sticky header with React Native ScrollView that shrinks, expands, and changes color on scroll to enhance your app's UX.
Read more >Sticky Component inside scrollview - react native
It is very simple with ScrollView component. There is already something called "stickyHeaderIndices" which takes the index of child to make sticky.
Read more >Fixed header with scroll view - Expo Snack
import { Text, View, StyleSheet,. ScrollView } from 'react-native';. let CreateLongList = () => {. let arr = []; ... const HeaderHeight =...
Read more >Sticky Headers for Scroll Views - Swift Talk - objc.io
We implement a sticky modifier that makes views in a scroll stick to the top.
Read more >SwiftUI — ScrollView Sticky Header Tutorial - Level Up Coding
Quick SwiftUI Tutorial on how to implement a sticky header at the top of your ScrollView. Use it with images and other custom...
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 Free
Top 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

Regarding the
<section-list>sticky header behavior, it’s enabled by default on iOS and disabled by default on Android. It does not look like we provide an explicit way to set/unset (viastickySectionHeadersEnabled), we should probably expose this.@flochtililoch thanks for catching that, I think contacts are using
<list>instead of<section-list>, will look into it.