android - 我更改了 Android 模拟器,我的应用程序在本机反应中有 marginTop
问题描述
我正在做大学项目。我在 Windows 10 上使用 react native 和 android 模拟器。我的旧模拟器生病了(打字时冻结,每次都响应“系统崩溃”)。然后我删除了模拟器并创建了新的模拟器。创建新设备后,我从 android 10 更新到 android 11。最后我打开我的应用程序,顶部有一个我不明白的空间。
{
const App = () => {
const isSignedIn = useSelector((state) => state.isUserSignedIn);
return (
<PaperProvider theme={theme}>
<NavigationContainer>
{!isSignedIn ?
<Stack.Navigator screenOptions={{ headerShown: true }}>
<Stack.Screen name="SignIn" component={SignIn}
options={{ presentation: "fullScreenModal", headerShown: false,
headerBackVisible: false }} />
<Stack.Screen name="SignUp" component={SignUp} options={{
presentation: "fullScreenModal",
headerBackVisible: true,
title: "KAYIT OL",
headerTitleAlign: "center",
}} />
</Stack.Navigator>
:
<Tabs.Navigator options={{ headerShown: false }} screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
return <Icon name={route.name === "Başvurular" ? "albums" : "person"}
type="ionicon" color={color}
size={size} />;
},
headerShown: false,
})}>
<Tabs.Screen name="Başvurular" component={ApplicationStackScreen} />
<Tabs.Screen name="Profil" component={ProfileStackScreen} />
</Tabs.Navigator>
}
</NavigationContainer>
</PaperProvider>
);
};
}
解决方案
推荐阅读
- sockets - tcp 自动调整最适合各种情况?
- c++ - 使用线程安全规则建议的非常量参数复制构造函数?
- php - if 和 else 条件在 laravel 中不适用于数据数组
- pdf - 尝试使用 papaja 在 pdf 上编译时,Rmarkdown 找不到 .png 图像
- vue.js - (Vue.js) 如何在 SweetAlert2 中使用 onClick 事件
- sql - 比较两个表并将记录与 SQL Server 过程中的状态相结合
- sql - 在 SQL Server 中获取过去 6 小时的行
- javascript - 如何在@react-navigation 抽屉中使用 useNavigation()?
- tensorflow - Tensorflow Profile 为 Conv2D 输出 2 FLOPS 而不是 1
- python-3.x - sklearn 指标 f1_score : pos_label valueError