Giter Site home page Giter Site logo

nbutmickey / react-native-collapsible-tabview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from junghsuan/react-native-collapsible-tabview

0.0 0.0 0.0 14.68 MB

This is only an implementation of tabview with collapsible header.

License: MIT License

JavaScript 68.23% Ruby 2.53% Objective-C 11.14% Java 14.49% Starlark 3.61%

react-native-collapsible-tabview's Introduction

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

  • Here I've upgraded react-native to 0.68.2 ,and react-native-tab-view to 3.1.1.
  • react-native-reanimated and react-native-gesture-handler have been removed by react-native-tab-view.
  • hermes is default enabled on both iOS and Android.
  • No changes to example code.
  • No furthur updates for old version.

2021-06

  • Be noticed that we are using react-native 0.62.2 in this example, some breaking changes may lead to crashes.
  • Accroding to this post, getNode() is deprecated. As a result, before 0.62.0 you should use ref.getNode() in order to get correct ref for the Animated component.

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

react-native-collapsible-tabview's People

Contributors

dependabot[bot] avatar junghsuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.