@@ -18,6 +18,7 @@ import {
1818 Actions ,
1919 Reducer ,
2020 ActionConst ,
21+ Overlay ,
2122 Tabs ,
2223 Modal ,
2324 Drawer ,
@@ -52,49 +53,54 @@ const reducerCreate = params => {
5253 } ;
5354} ;
5455const getSceneStyle = ( ) => ( {
55- backgroundColor : "white " ,
56+ backgroundColor : "#F5FCFF " ,
5657 shadowOpacity : 1 ,
5758 shadowRadius : 3 ,
5859} ) ;
59-
60+ const BackgroundView = ( ) => < View style = { { position : 'absolute' , top : 0 , bottom : 0 , left : 0 , right : 0 , backgroundColor : 'red' } } />
6061const Example = ( ) => (
61- < View style = { { flex : 1 } } >
62- < Router createReducer = { reducerCreate } tintColor = "red" getSceneStyle = { getSceneStyle } >
63- < Modal hideNavBar transitionConfig = { ( ) => ( { screenInterpolator : CardStackStyleInterpolator . forFadeFromBottomAndroid } ) } >
64- < Lightbox leftButtonTextStyle = { { color : 'green' } } backButtonTextStyle = { { color : 'red' } } >
65- < Stack hideNavBar hideTabBar titleStyle = { { alignSelf : 'center' } } >
66- < Scene key = "echo" back clone component = { EchoView } getTitle = { ( { navigation } ) => navigation . state . key } />
67- < Scene key = "register" back duration = { 0 } >
68- < Scene key = "_register" component = { Register } title = "Register" />
69- < Scene key = "register2" component = { Register } title = "Register2" />
70- < Scene key = "home" component = { Home } title = "Replace" type = { ActionConst . REPLACE } />
62+ < Router createReducer = { reducerCreate } tintColor = "red" getSceneStyle = { getSceneStyle } >
63+ < Overlay >
64+ < Modal hideNavBar
65+ transitionConfig = { ( ) => ( { screenInterpolator : CardStackStyleInterpolator . forFadeFromBottomAndroid } ) } >
66+ < Lightbox leftButtonTextStyle = { { color : 'green' } } backButtonTextStyle = { { color : 'red' } } >
67+ < Stack hideNavBar hideTabBar titleStyle = { { alignSelf : 'center' } } >
68+ < Scene key = "echo" back clone component = { EchoView } getTitle = { ( { navigation} ) => navigation . state . key } />
69+ < Scene key = "register" back duration = { 0 } >
70+ < Scene key = "_register" component = { Register } title = "Register" />
71+ < Scene key = "register2" component = { Register } title = "Register2" />
72+ < Scene key = "home" component = { Home } title = "Replace" type = { ActionConst . REPLACE } />
7173 </ Scene >
72- < Scene key = "launch" component = { Launch } title = "Launch" initial />
74+ < Scene key = "launch" component = { Launch } title = "Launch" initial />
7375 < Drawer contentComponent = { TabView } >
74- < Tabs key = "tabbar" gestureEnabled = { false } showLabel = { false } tabs tabBarStyle = { styles . tabBarStyle } activeBackgroundColor = "white"
76+ < Tabs key = "tabbar" gestureEnabled = { false } showLabel = { false } tabs tabBarStyle = { styles . tabBarStyle }
77+ activeBackgroundColor = "white"
7578 inactiveBackgroundColor = "red" >
7679 < Stack
7780 key = "tab1"
7881 title = "Tab #1"
7982 tabBarLabel = "TAB #1"
8083 inactiveBackgroundColor = 'white' activeBackgroundColor = '#dddddd'
8184 icon = { TabIcon }
82- navigationBarStyle = { { backgroundColor : 'green' } }
83- titleStyle = { { color : 'white' , alignSelf : 'center' } }
85+ navigationBarStyle = { { backgroundColor : 'green' } }
86+ titleStyle = { { color : 'white' , alignSelf : 'center' } }
8487 >
85- < Scene
86- key = "tab1_1"
87- component = { TabView }
88- title = "Tab #1_1"
89- onRight = { ( ) => alert ( 'Right button' ) }
90- rightTitle = "Right"
91- />
88+ < Overlay >
89+ < Scene component = { BackgroundView } />
90+ < Scene
91+ key = "tab1_1"
92+ component = { TabView }
93+ title = "Tab #1_1"
94+ onRight = { ( ) => alert ( 'Right button' ) }
95+ rightTitle = "Right"
96+ />
97+ </ Overlay >
9298 < Scene
9399 key = "tab1_2"
94100 component = { TabView }
95101 title = "Tab #1_2"
96102 back
97- titleStyle = { { color : 'black' , alignSelf : 'center' } }
103+ titleStyle = { { color : 'black' , alignSelf : 'center' } }
98104 />
99105 </ Stack >
100106 < Scene key = "tab2" initial title = "Tab #2" icon = { TabIcon } >
@@ -113,7 +119,8 @@ const Example = () => (
113119 panHandlers = { null }
114120 />
115121 </ Scene >
116- < Scene key = "tab3" component = { TabView } title = "Tab #3" icon = { TabIcon } rightTitle = "Right3" onRight = { ( ) => { } } />
122+ < Scene key = "tab3" component = { TabView } title = "Tab #3" icon = { TabIcon } rightTitle = "Right3" onRight = { ( ) => {
123+ } } />
117124 < Scene key = "tab4" component = { TabView } title = "Tab #4" hideNavBar icon = { TabIcon } />
118125 < Scene key = "tab5" component = { TabView } title = "Tab #5" icon = { TabIcon } />
119126 </ Tabs >
@@ -124,7 +131,7 @@ const Example = () => (
124131 < Stack key = "login" titleStyle = { { alignSelf : "center" } } >
125132 < Scene component = { Login } title = "Login"
126133 key = "loginModal"
127- onExit = { ( ) => console . log ( "onExit" ) }
134+ onExit = { ( ) => console . log ( "onExit" ) }
128135 leftTitle = "Cancel" onLeft = { Actions . pop } />
129136 < Scene
130137 key = "loginModal2"
@@ -144,8 +151,9 @@ const Example = () => (
144151 />
145152 </ Stack >
146153 </ Modal >
147- </ Router >
148- < MessageBar />
149- </ View > ) ;
154+ < Scene component = { MessageBar } />
155+ </ Overlay >
156+ </ Router >
157+ ) ;
150158
151159export default Example ;
0 commit comments