crazycodeboy / react-native-splash-screen

A splash screen for react-native, hide when application loaded ,it works on iOS and Android.
MIT License
5.61k stars 1.1k forks source link

There is extra white space in Android in full screen mode #515

Open inmogr opened 3 years ago

inmogr commented 3 years ago

Run react-native info in your project and share the content. I'm having this issue, even in fullscreen i'm getting white space on the top

info Fetching system and libraries information...
System:
    OS: macOS 11.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 135.60 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.3/12C33 - /usr/bin/xcodebuild
  Languages:
    Java: 14.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
  npmGlobalPackages:
    *react-native*: Not Found

What react-native-splash-screen version are you using?

"react-native-splash-screen": "3.2.0",

What platform does your issue occur on? (Android/iOS/Both) Android

Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue Simple just use the code provided below and use the setup in your documentation

2) Interesting logs Working but not as expected so no interesting logs

Join a screenshot or video of the problem on the simulator or device? Screenshot_1610539623

Show us the code you are using? activity

SplashScreen.show(this, R.style.SplashScreen);

styles

<style name="SplashScreen" parent="Theme.ReactNative.AppCompat.Light.NoActionBar.FullScreen">
        <item name="android:windowBackground">@color/red</item>
        <item name="android:windowTranslucentNavigation">false</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowDrawsSystemBarBackgrounds">false</item>
        <item name="android:windowTranslucentStatus">false</item>
</style>

launch_screen

<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical">

    <ImageView
        android:layout_width="128dp"
        android:layout_height="128dp"
        android:scaleType="centerCrop"
        android:src="@mipmap/launch_screen_logo" />

</LinearLayout>
chiragbhaiji commented 3 years ago

I am getting the same issue.

Found the same here as well: https://stackoverflow.com/questions/64565157/how-to-fix-empty-space-on-top-of-curved-android-phone

Any solution for this issue?

ShinnnVu commented 3 years ago

I am getting the same issue. Any solution yet? @chirag0966 @inmogr

chiragbhaiji commented 3 years ago

I am getting the same issue. Any solution yet? @chirag0966 @inmogr

Based on the accepted answer I left this issue at that time.

inmogr commented 1 year ago

The issue is caused by the AVD not the rn