JungHsuan / react-native-collapsible-tabview

This is only an implementation of tabview with collapsible header.
MIT License
276 stars 61 forks source link
collapsible collapsible-header collapsible-tab javascript react-native tabview

React native collapsible tabview example

This is just a simple example implementing a tabview with collapsible header. Here we use react-native-tab-view in our implemetation.

Dependencies

2022-07

2021-06

Usage

There are three examples under src folder:

  1. CollapsibleTabView: provides the most basic workable example without scrollable header and pull-to-refresh.
  2. HeaderScrollableTabView: provides scrollable header without pull-to-refresh.
  3. PullRefreshTabView: provides both scrollable header and pull-to-refresh.

It is critical to give the correct paddingTop and minHeight of contentContainerStyle of the FlatList

  contentContainerStyle={{
      ...
      paddingTop: HeaderHeight + TabBarHeight,
      minHeight: windowHeight - SafeStatusBar + HeaderHeight,
  }}

Demo

iOS ios Android Android