我试图在React中更改标题栏的高度-本机堆栈导航器
这是我的密码
我试着把headerStyle:高度:‘100’,但它不起作用
我该怎么办?
const LoginNavigator = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Login"
component={Login}
options={{
title: 'MOVIEAPP',
headerTransparent: true,
headerTintColor: '#E70915',
headerTitleStyle: {
fontWeight: 'bold',
},
headerStyle:{
height:100, // i tried to put height
}
}}
/>
</Stack.Navigator>
);
};发布于 2022-05-07 10:30:56
你能更新下面的选项支柱并让我知道它是否有效吗?
options={{
title: 'MOVIEAPP',
headerTitleStyle: {
fontWeight: 'bold',
},
headerStyle:{
height:200, // i tried to put height
backgroundColor: 'red'
}
}}发布于 2022-05-07 10:45:33
请核对一下正式文件。
我们在这里只看到backgroundColor。
设置自定义标头
<Stack.Screen
options={
header: (props) =>
(
<View style={{ height: 100 }}>
...
</View>
),
}
/>但是您必须找到一种方法来集成箭头功能。
https://stackoverflow.com/questions/72151592
复制相似问题