【问题标题】:Hide toolbar in expo app在世博会应用程序中隐藏工具栏
【发布时间】:2017-11-07 10:10:52
【问题描述】:

如何在 expo react 本机应用程序中隐藏工具栏。?虽然我已将其添加到 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

【问题讨论】:

    标签: javascript react-native expo


    【解决方案1】:

    与往常一样,建议阅读您使用的库的文档。

      static navigationOptions = {
        header: null,
    
      };
    

    【讨论】:

      猜你喜欢
      • 2021-01-30
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多