Hide toolbar in expo app

夙愿已清 提交于 2021-01-23 11:06:54

问题


How do I hide the toolbar in an expo react native application.? Though I have added it in the Header tag. I have attached the code as well as the screenshot.

Code:

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


回答1:


As always, recommend reading documentation of the libraries you use.

  static navigationOptions = {
    header: null,

  };


来源:https://stackoverflow.com/questions/47155181/hide-toolbar-in-expo-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!