如何在StackNavigator标题下方设置TabNavigator图标?

时间:2019-04-07 13:08:46

标签: react-native tabs

我必须将主页的标题设置为顶部,但是TabNavigator是默认的顶部。我该如何编辑? TabNavigator始终位于页面顶部。

const HomeStack = createStackNavigator({
  Home: { screen: Home,navigationOptions: {headerStyle: {
            backgroundColor: '#222222',},headerTintColor: 'white',headerTitle:'title1',headerBackTitle: ' '} },
});
const OtherStack = createStackNavigator({
    Other: { screen: Other,navigationOptions: {headerStyle: {
              backgroundColor: '#222222'},headerTintColor: 'white',headerTitle:'title2'} }
}); 
const MainScreenNavigator = TabNavigator(
  {
    Home: {screen : HomeStack},
    Other: {screen : OtherStack},
  },
  {

    tabBarComponent: props => {

      return (
        <View>
        <Footer>
          <FooterTab>
            <Button 1/>
            <Button 2/> 
          </FooterTab>
        </Footer>
        </View>

      );
    }
  });

0 个答案:

没有答案