Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/430.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 反应本机隐藏顶栏_Javascript_Android_React Native - Fatal编程技术网

Javascript 反应本机隐藏顶栏

Javascript 反应本机隐藏顶栏,javascript,android,react-native,Javascript,Android,React Native,我对react native不太熟悉,我正在尝试移除顶栏(灰色部分): 我的代码: function Login() { return ( <View style={styles.background}> <Text style={{ color: "red" }}>hey</Text> </View> ); } const styles = StyleSheet.create({ ba

我对react native不太熟悉,我正在尝试移除顶栏(灰色部分):

我的代码:

function Login() {
  return (
    <View style={styles.background}>
      <Text style={{ color: "red" }}>hey</Text>
    </View>
  );
}
const styles = StyleSheet.create({
  background: { backgroundColor: colours.primaryColour, height: "100%" },
});
函数登录(){
返回(
嘿
);
}
const styles=StyleSheet.create({
背景:{backgroundColor:colors.primarycolor,高度:“100%”,
});

根据我的java经验,我知道要在styles.xml中将主题更改为noActionBar,但它已经存在了,但我仍然有一个导航栏。如果你知道怎么做,请告诉我。

你应该在
Start.js
文件中添加
headervible:false

示例代码:

const Start = createStackNavigator({
  Splash: { screen: Splash },
  Home: { screen: screens },
  Login: { screen: Login },
  Resend: { screen: Resend },
}, {
  initialRouteName: 'Splash',
  headerMode: 'none',
  navigationOptions: {
    headerVisible: false,
  }
}

您应该在
Start.js
文件中添加
headervible:false

示例代码:

const Start = createStackNavigator({
  Splash: { screen: Splash },
  Home: { screen: screens },
  Login: { screen: Login },
  Resend: { screen: Resend },
}, {
  initialRouteName: 'Splash',
  headerMode: 'none',
  navigationOptions: {
    headerVisible: false,
  }
}

您可以添加一个代码示例吗。这是导航中的一个屏幕吗?你能添加一个代码示例吗。这是导航中的一个屏幕吗?不工作:/不工作:/