隐藏本机DrawerNavigator标头,反应导航4

时间:2019-12-08 14:22:00

标签: react-native

我需要隐藏此标题,反应导航4

enter image description here

进口

import React, { Component } from 'react';
import { Text, View, SafeAreaView, ScrollView, Dimensions, Image,StyleSheet } from 'react-native';
import {   createAppContainer } from 'react-navigation';
import { Icon } from 'native-base';
import Page1 from './pages/Page1';
import Page2 from './pages/Page2';
import Logout from './Logout.js';
import { createDrawerNavigator } from 'react-navigation-drawer'; 

样式

const styles=StyleSheet.create({
  container: {
    flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
  }
})

抽屉配置

const Width=Dimensions.get('window').width;
const DrawerConfig={
  drawerWidth:Width*0.83,

}

抽屉导航语句

const App=createDrawerNavigator(
  {
    Page1: {
      screen: Page1,
      navigationOptions: {
        drawerLabel: 'Simple tabs',


      },
    },
    Page2: {
      screen: Page2,
      navigationOptions: {
        drawerLabel: 'Stacks Over Tabs',

      },
    },
  },

  DrawerConfig
) ;

导出默认的createAppContainer(App);



0 个答案:

没有答案