@@ -2,7 +2,7 @@ import React from 'react';
22import { observable , action } from 'mobx' ;
33import * as ActionConst from './ActionConst' ;
44import { OnEnter , OnExit , assert } from './Util' ;
5- import { View , Image , Animated , Easing } from 'react-native' ;
5+ import { View , Image , Animated , Easing , Platform } from 'react-native' ;
66import { TabNavigator , DrawerNavigator , StackNavigator , NavigationActions , TabBarTop , TabBarBottom } from 'react-navigation' ;
77import { LeftButton , RightButton , BackButton } from './NavBar' ;
88import LightboxNavigator from './LightboxNavigator' ;
@@ -318,8 +318,8 @@ class NavigationStore {
318318 }
319319 const res = { } ;
320320 const order = [ ] ;
321- const { navigator, contentComponent, tabBarPosition , lazy, duration, ...parentProps } = scene . props ;
322- let { tabs, modal, lightbox, overlay, drawer, tabBarComponent, transitionConfig } = parentProps ;
321+ const { navigator, contentComponent, lazy, duration, ...parentProps } = scene . props ;
322+ let { tabs, modal, lightbox, overlay, tabBarPosition , drawer, tabBarComponent, transitionConfig } = parentProps ;
323323 if ( scene . type === Modal ) {
324324 modal = true ;
325325 } else if ( scene . type === Drawer ) {
@@ -436,6 +436,9 @@ class NavigationStore {
436436 tabBarComponent = tabBarPosition === 'top' ? ( props ) => < TabBarTop { ...props } { ...commonProps } /> :
437437 ( props ) => < TabBarBottom { ...props } { ...commonProps } /> ;
438438 }
439+ if ( ! tabBarPosition ) {
440+ tabBarPosition = Platform . OS === 'android' ? 'top' : 'bottom' ;
441+ }
439442 return TabNavigator ( res , { lazy, tabBarComponent, tabBarPosition, initialRouteName, initialRouteParams, order, ...commonProps ,
440443 tabBarOptions : createTabBarOptions ( commonProps ) , navigationOptions : createNavigationOptions ( commonProps ) } ) ;
441444 } else if ( drawer ) {
0 commit comments