React native 加载不同场景时对本机背景空白动画作出反应

React native 加载不同场景时对本机背景空白动画作出反应,react-native,react-native-navigation,React Native,React Native Navigation,我在iOS/Android的react原生应用程序中工作,我在wix navigation v2中有以下结构: SplashScreenView (stack) |_> if user is logged in, starts tabBasedApp (stack) |_> if user is not logged in, goes to AuthView (stack) 我的应用程序背景是绿色的。所以每当我启动应用程序(PROD/Relp),在加载每个场景之前,我总

我在iOS/Android的react原生应用程序中工作,我在wix navigation v2中有以下结构:

SplashScreenView (stack)
   |_> if user is logged in, starts tabBasedApp (stack)
   |_> if user is not logged in, goes to AuthView (stack)
我的应用程序背景是绿色的。所以每当我启动应用程序(PROD/Relp),在加载每个场景之前,我总是看到空白的白色闪烁背景。看起来很糟糕

应用程序启动=白色加载,大约1-2秒,然后SplashScreen进入视图,结束SplashScreen动画,然后再次轻弹,因为它正在加载下一个基于选项卡的屏幕

这是一个“RootView”问题吗?如何修复此细节

更新:在styles.xml下面的颜色设置中添加了这个之后,它有点工作了,但是每当我第一次打开应用程序时,还有一个空白卡住的时刻我无法修复

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
  <item name="android:colorBackground">@color/custom_theme_color</item>
</style>

@颜色/自定义主题颜色

一旦应用程序被打开并最小化,再次打开,这种空白就不会再次出现。原因是什么?

这是对react native闪屏的错误理解。正确安装并设置了正确的styles.xml和colors.xml之后,它工作了

如果有人处于相同的情况,这是my styles.xml文件:

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowBackground">@drawable/splash_gradient_bg</item>
        <item name="android:statusBarColor">@color/custom_theme_color</item>
    </style>

    <style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@drawable/splash_gradient_bg</item>
        <item name="android:statusBarColor">@color/custom_theme_color</item>
    </style>

</resources>

@可拉伸/飞溅梯度
@颜色/自定义主题颜色
真的
@可拉伸/飞溅梯度
@颜色/自定义主题颜色