0
我使用的是來自https://reactnavigation.org/docs/navigators/drawer的React導航的抽屜,我想給出頭部下方抽屜的起始位置,但我不知道如何實現這一點。我一直在尋找reactnavigation.org的文檔,但無法真正找到任何提示。React導航抽屜位置
我使用的是來自https://reactnavigation.org/docs/navigators/drawer的React導航的抽屜,我想給出頭部下方抽屜的起始位置,但我不知道如何實現這一點。我一直在尋找reactnavigation.org的文檔,但無法真正找到任何提示。React導航抽屜位置
它會默認自帶的標題下,你可以嘗試這樣的事情在你的index.android.js或index.ios.js
import React, {Component} from 'react';
import { AppRegistry, View, BackAndroid, StatusBar,} from 'react-native';
import {
NavigationActions,
addNavigationHelpers,
StackNavigator,
DrawerNavigator
} from 'react-navigation';
import LandingScreen from 'src/screens/landingScreen';
import Login from 'src/screens/login'
import SignUp from 'src/screens/signUp'
import ForgotPassword from 'src/screens/forgotPassword'
import Dashboard from 'src/screens/dashboard'
import UserProfile from 'src/screens/userProfile'
export const Drawer = DrawerNavigator({
Dashboard:{
path:'/',
screen:Dashboard,
},
UserProfile:{
path:'/'
screen:UserProfile
},
}, {
initialRouteName: 'Dashboard',
contentOptions: {
activeTintColor: '#e91e63',
},
headerMode: 'screen',
});
const routesConfig = {
Landing:{screen:LandingScreen},
Login: { screen: Login },
SignUp: { screen: SignUp },
ForgotPassword: { screen: ForgotPassword },
Drawer:{screen:Drawer}
};
export const AppNavigator = StackNavigator(routesConfig, {
initialRouteName: 'Drawer'
});
AppRegistry.registerComponent('Riduk',() => AppNavigator);