Thanks for @janicduplessis 's great work #9456 ,now we can stick the section headers on Android as on iOS, and I can remove my js workaround finally, I've test it and works really awesome with little flaws:
- The sticky headers will bounce if
LayoutAnimation is configured, just try the ListViewPagingExample you can see that sticky headers will be affected by LayoutAnimation
- If
renderHeader is set to ListView, and the header is a View component with no children, then the first item of the section rows will be stuck instead of the section header.
//good
renderHeader= () => {
<View style={styles.header} ><View /></View>;
}
//bad
renderHeader= () => {
<View style={styles.header} />;
}
but if you use Text or TouchableOpacity instead of View with no children, it works accurately too
Thanks for @janicduplessis 's great work #9456 ,now we can stick the section headers on Android as on iOS, and I can remove my js workaround finally, I've test it and works really awesome with little flaws:
LayoutAnimationis configured, just try theListViewPagingExampleyou can see that sticky headers will be affected byLayoutAnimationrenderHeaderis set toListView, and the header is aViewcomponent with no children, then the first item of the section rows will be stuck instead of the section header.but if you use
TextorTouchableOpacityinstead ofViewwith no children, it works accurately too