1. <tfoot id='RNeuF'></tfoot>

      <small id='RNeuF'></small><noframes id='RNeuF'>

        <bdo id='RNeuF'></bdo><ul id='RNeuF'></ul>
      <legend id='RNeuF'><style id='RNeuF'><dir id='RNeuF'><q id='RNeuF'></q></dir></style></legend>

    2. <i id='RNeuF'><tr id='RNeuF'><dt id='RNeuF'><q id='RNeuF'><span id='RNeuF'><b id='RNeuF'><form id='RNeuF'><ins id='RNeuF'></ins><ul id='RNeuF'></ul><sub id='RNeuF'></sub></form><legend id='RNeuF'></legend><bdo id='RNeuF'><pre id='RNeuF'><center id='RNeuF'></center></pre></bdo></b><th id='RNeuF'></th></span></q></dt></tr></i><div id='RNeuF'><tfoot id='RNeuF'></tfoot><dl id='RNeuF'><fieldset id='RNeuF'></fieldset></dl></div>

      Expo Android 从底部选项卡导航器切换到材料顶部选项卡导航器时出现白色闪烁

      Expo Android there is a white flicker when switching from bottom tab navigator to material top tab navigator(Expo Android 从底部选项卡导航器切换到材料顶部选项卡导航器时出现白色闪烁)
        <i id='6AnSw'><tr id='6AnSw'><dt id='6AnSw'><q id='6AnSw'><span id='6AnSw'><b id='6AnSw'><form id='6AnSw'><ins id='6AnSw'></ins><ul id='6AnSw'></ul><sub id='6AnSw'></sub></form><legend id='6AnSw'></legend><bdo id='6AnSw'><pre id='6AnSw'><center id='6AnSw'></center></pre></bdo></b><th id='6AnSw'></th></span></q></dt></tr></i><div id='6AnSw'><tfoot id='6AnSw'></tfoot><dl id='6AnSw'><fieldset id='6AnSw'></fieldset></dl></div>

        <small id='6AnSw'></small><noframes id='6AnSw'>

      1. <legend id='6AnSw'><style id='6AnSw'><dir id='6AnSw'><q id='6AnSw'></q></dir></style></legend>

            <tbody id='6AnSw'></tbody>

              <tfoot id='6AnSw'></tfoot>

              • <bdo id='6AnSw'></bdo><ul id='6AnSw'></ul>
                本文介绍了Expo Android 从底部选项卡导航器切换到材料顶部选项卡导航器时出现白色闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                从底部标签导航器切换到顶部标签导航器时出现白色闪烁

                这个白色闪烁在这个 gif 之外更加明显.但是我正在使用 Expo 管理的 React Native 项目,当我从底部选项卡导航器切换到顶部选项卡导航器时,屏幕会闪烁白色.此问题仅发生在 Android 上.最重要的是,当您按下 TextInput 打开键盘时,在键盘动画发生时键盘占用的部分中的屏幕变为白色.这是我在 App.js 中的导航器

                This white flicker is much more noticeable outside of this gif. But I am using an Expo managed React Native project and when I switch from my Bottom tab navigator to my Top tab navigator the screen flickers white. This issue only occurs on Android. On top of that, when you press a TextInput to open the keyboard, the screen turns white in the section the keyboard takes up while the keyboard animation is occuring. Here are my navigators in App.js

                const AuthTabs = createMaterialTopTabNavigator();
                const AuthStackScreen = () => (
                      <AuthTabs.Navigator tabBarOptions={options}>
                          <AuthTabs.Screen name="Sign In" component={SignInScreen} />
                          <AuthTabs.Screen name="Sign Up" component={SignUpScreen} />
                      </AuthTabs.Navigator>
                    );
                

                const Tab = createBottomTabNavigator();
                  const MainStack = () => (
                    <Tab.Navigator>
                      <Tab.Screen name="Deals" component={DealsStackScreen} />
                      <Tab.Screen name="Categories" component={CategoriesStackScreen} />
                      <Tab.Screen name="My Account" component={MyAccountStackScreen} />
                    </Tab.Navigator>
                

                  const RootStack = createStackNavigator();
                  const Root = () => (
                      <RootStack.Navigator headerMode="none" cardStyle={{opacity: 1}} >
                          <RootStack.Screen name="Home" component={MainStack}/>
                          <RootStack.Screen name="Auth" component={AuthStackScreen}/>
                      </RootStack.Navigator>
                  );
                

                    return (
                      <AuthContextProvider>
                        <NavigationContainer theme={{ colors: {background: `${Colors.surface}` }}}>
                          <Root />
                        </NavigationContainer>
                      </AuthContextProvider>
                    );
                

                我尝试将我的主题颜色添加到 NavigationContainer 但这并没有解决问题.链接还显示了正在发生的事情的 GIF.

                I tried adding my theme color to the NavigationContainer but this did not fix the issue. Also link shows the GIF of what is happening.

                推荐答案

                是的,你必须将你的 RootStack 包裹在一个 View 周围,以 backgroundColor 作为主题的 backgroundColor

                Yes, you have to wrap your RootStack around a View with backgroundColor as theme's backgroundColor

                您的 RootStack 现在看起来像这样

                Your RootStack would look something like this now

                import { useTheme } from '@react-navigation/native';
                
                ... 
                
                const { colors } = useTheme();
                
                const RootStack = createStackNavigator();
                
                const Root = () => (
                  <View style={{ flex:1, backgroundColor: colors.background }}> // This is the catch..Also it needs flex:1
                    <RootStack.Navigator headerMode="none" cardStyle={{ opacity: 1 }}>
                      <RootStack.Screen name="Home" component={MainStack} />
                      <RootStack.Screen name="Auth" component={AuthStackScreen} />
                    </RootStack.Navigator>
                  </View>
                );
                

                这篇关于Expo Android 从底部选项卡导航器切换到材料顶部选项卡导航器时出现白色闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                Ordinals in words javascript(javascript中的序数)
                getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)

                <small id='XUnUk'></small><noframes id='XUnUk'>

                <i id='XUnUk'><tr id='XUnUk'><dt id='XUnUk'><q id='XUnUk'><span id='XUnUk'><b id='XUnUk'><form id='XUnUk'><ins id='XUnUk'></ins><ul id='XUnUk'></ul><sub id='XUnUk'></sub></form><legend id='XUnUk'></legend><bdo id='XUnUk'><pre id='XUnUk'><center id='XUnUk'></center></pre></bdo></b><th id='XUnUk'></th></span></q></dt></tr></i><div id='XUnUk'><tfoot id='XUnUk'></tfoot><dl id='XUnUk'><fieldset id='XUnUk'></fieldset></dl></div>

                  • <bdo id='XUnUk'></bdo><ul id='XUnUk'></ul>
                    <legend id='XUnUk'><style id='XUnUk'><dir id='XUnUk'><q id='XUnUk'></q></dir></style></legend>
                        <tbody id='XUnUk'></tbody>
                        • <tfoot id='XUnUk'></tfoot>