satya164 / react-native-tab-view

A cross-platform Tab View component for React Native
MIT License
5.14k stars 1.07k forks source link

Doesn't work with `SafeAreaView` on Android only #1338

Closed KrisLau closed 2 years ago

KrisLau commented 2 years ago

Current behavior

I'm wrapping the TabView in a SafeAreaView and it doesn't seem to work on Android. image image

I tried repro-ing in the snack but it doesn't seem to be the same in the snack

Expected behavior

It should like how it does in iOS: image

Reproduction

https://snack.expo.dev/auZcPPHTe

Platform

Environment

package version
react-native-tab-view 3.1.1
react-native-pager-view 5.4.9
react-native 0.64.3
expo N/A
node 14.16.1
npm or yarn 1.22.10
github-actions[bot] commented 2 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

KrisLau commented 2 years ago

Couldn't find version numbers for the following packages in the issue:

  • expo

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • react-native-pager-view (found: 5.4.9, latest: 5.4.15)
  • react-native (found: 0.64.3, latest: 0.68.1)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

Not upgrading because i currently use the expo-unimodules package and expo causes problems with my client database

szymonrybczak commented 2 years ago

As official React Native documentation says about SafeAreaView - It is currently only applicable to iOS devices with iOS version 11 or later., so it isn't any problem with react-native-tab-view, to achieve your goal you can use e.g. StatusBar.