javascript - 在 expo 应用程序中隐藏工具栏

标签 javascript react-native expo

如何在 expo react native 应用程序中隐藏工具栏?虽然我已经将它添加到 Header 标签中。我已附上代码和屏幕截图。

代码:

import React from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import { Container, Header, Item, Input, Icon, Button, Text } from 'native-base';

export default class ScreenScreen extends React.Component {
  static navigationOptions = {
    title: 'Search',

  };

  render() {
    return (
      <Container>
    <Header searchBar rounded>
      <Item>
        <Icon name="ios-search" />
        <Input placeholder="Search anything.." />
        <Icon name="ios-people" />
      </Item>
      <Button transparent>
        <Text>Search</Text>
      </Button>
    </Header>
  </Container>
);
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: 15,
    backgroundColor: '#fff',
  },
});

This is a screenshot of what I am presently get from this code. I want a way to remove the top toolbar

Expected toolbar after adding search bar tag in the header tag

最佳答案

一如既往,建议阅读您使用的库的文档。

  static navigationOptions = {
    header: null,

  };

关于javascript - 在 expo 应用程序中隐藏工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47155181/

相关文章:

javascript - 我怎样才能减少expo build ios的大小,它大约是188 MB,

javascript - React Native 的堆栈导航器和选项卡导航器出现问题

react-native - 在 React Native 中,使用 expo-location,iOS 中的 gps 位置刷新率太低

javascript - 如何在javascript正则表达式中传递json数据?并按顺序验证密码

javascript - HTML 注释(如果没有 javascript)

javascript - 如何检查数组是否相等?

database - 在 React-Native 应用程序上下载和使用 SQLite 数据库

javascript - JSON 服务在 Angular JS 中不起作用

javascript - 如何确保每次使用 React Native 和 AWS 都会导入我的个人资料信息?

由于 hermes-debug.aar 引用,gradle bundleDebugAar 步骤失败