software-mansion / react-native-screens

Native navigation primitives for your React Native app.
MIT License
3.01k stars 510 forks source link

[android][expo]: statusBarStyle breaks translucent StatusBar #1440

Open hirbod opened 2 years ago

hirbod commented 2 years ago

Description

I have

  androidStatusBar: {
    translucent: true
  },

in my app.config.ts. This is working fine, but when I use statusBarStyle auto/light/dark, I get a white background on my Statusbar and it won't be translucent/floating over my content anymore.

Screenshots

Steps To Reproduce

  1. Make StatusBar translucent via app.config.ts
  2. add statusBarStyle to any Screen

Expected behavior

Should not break the translucent/floating StatusBar

Actual behavior

It is reverting the translucent StatusBar, thus breaking height calculations as well.

Reproduction

          <Navigator.Screen
            component={HomeStack}
            options={{
                statusBarStyle: 'inverted'
            }}
          />

Platform

Workflow

Package versions

package version
react-native 0.68.1
@react-navigation/native 6.0.10
@react-navigation/native-stack 6.6.2
react-native-screens 3.13.1
react-native-safe-area-context 4.2.6
react-native-gesture-handler 2.4.1
react-native-reanimated 2.8.0
expo SDK 45 Beta-9
github-actions[bot] commented 2 years ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?

a-eid commented 2 years ago

actually this expo settings breaks the keyboard adjustResize somehow on android too.

hirbod commented 2 years ago

Yes it does indeed. I kinda semi fixed all of this issues together with https://github.com/kirillzyusko/react-native-keyboard-controller since it changes StatusBar and keyboard controller back to how it should be

1880akshay commented 1 month ago

adjustResize is not working in android with status bar set as translucent. Any fixes yet?