如何解决我在react-native android中获取默认标题,如何修复该标题?
enter image description here如何在react-native中更改该标头,在构建后我得到了默认的android标头。请解决此问题
解决方法
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerTransparent: false,headerTitleAlign: "center",headerTitleStyle: {
fontSize: 13,fontWeight: "normal",letterSpacing: 1,color: "#fff",},headerStyle: {
backgroundColor: "#7862FF",headerTintColor: "#fff",headerBackTitleVisible: false,}}
>
{loginState.userToken == null ? (
<>
<Stack.Screen
name="Login"
component={SignInScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SignUp"
component={SignUpScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Forgotpassword"
component={Forgetpassword}
options={{ headerShown: false }}
/>
</>
) : (
<>
<Stack.Screen
name="Landing"
component={LandingScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Dashboard"
component={DashboardScreen}
options={{ title: "Dashboard",headerTransparent: false }}
/>
<Stack.Screen
name="ArCamera"
component={CreateArTag}
options={{ title: "",headerTransparent: true }}
/>
<Stack.Screen
name="ViewArTag"
component={ViewArTag}
options={{ title: "",headerTransparent: true }}
/>
</>
)}
</Stack.Navigator>
</NavigationContainer>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。