|
@@ -35,82 +35,82 @@ export default class App {
|
35
|
35
|
startApp(root) {
|
36
|
36
|
switch (root) {
|
37
|
37
|
case 'login':
|
38
|
|
- //Navigation.startSingleScreenApp({
|
39
|
|
- // screen: {
|
40
|
|
- // screen: 'example.LoginScreen',
|
41
|
|
- // title: 'Login',
|
42
|
|
- // navigatorStyle: {}
|
43
|
|
- // },
|
44
|
|
- // passProps: {
|
45
|
|
- // str: 'This is a prop passed in \'startSingleScreenApp()\'!',
|
46
|
|
- // obj: {
|
47
|
|
- // str: 'This is a prop passed in an object!',
|
48
|
|
- // arr: [
|
49
|
|
- // {
|
50
|
|
- // str: 'This is a prop in an object in an array in an object!'
|
51
|
|
- // }
|
52
|
|
- // ],
|
53
|
|
- // arr2: [
|
54
|
|
- // [
|
55
|
|
- // 'array of strings',
|
56
|
|
- // 'with two strings'
|
57
|
|
- // ],
|
58
|
|
- // [
|
59
|
|
- // 1, 2, 3
|
60
|
|
- // ]
|
61
|
|
- // ]
|
62
|
|
- // },
|
63
|
|
- // num: 1234,
|
64
|
|
- // fn: function() {
|
65
|
|
- // return 'Hello from a function!';
|
66
|
|
- // }
|
67
|
|
- // }
|
68
|
|
- //});
|
69
|
38
|
Navigation.startSingleScreenApp({
|
70
|
|
- screen: {
|
71
|
|
- screen: 'example.FirstTabScreen',
|
72
|
|
- title: 'Login',
|
73
|
|
- topTabs: [
|
74
|
|
- {
|
75
|
|
- screenId: 'example.ListScreen',
|
76
|
|
- title: 'Tab1',
|
77
|
|
- passProps: {
|
78
|
|
- str: 'This is a prop passed to Tab1'
|
79
|
|
- }
|
80
|
|
- },
|
81
|
|
- {
|
82
|
|
- screenId: 'example.PushedScreen',
|
83
|
|
- title: 'Tab2',
|
84
|
|
- passProps: {
|
85
|
|
- str: 'This is a prop passed to Tab2'
|
86
|
|
- }
|
87
|
|
-
|
88
|
|
- },
|
89
|
|
- {
|
90
|
|
- screenId: 'example.PushedScreen',
|
91
|
|
- title: 'Tab3',
|
92
|
|
- passProps: {
|
93
|
|
- str: 'This is a prop passed to Tab3'
|
94
|
|
- }
|
95
|
|
- },
|
96
|
|
- {
|
97
|
|
- screenId: 'example.FirstTabScreen',
|
98
|
|
- title: 'Tab4',
|
99
|
|
- passProps: {
|
100
|
|
- str: 'This is a prop passed to Tab4',
|
101
|
|
- fn: () => 'Hello from a function passed as passProps!'
|
102
|
|
- }
|
103
|
|
- }
|
104
|
|
- ],
|
105
|
|
- navigatorStyle: {}
|
106
|
|
- },
|
107
|
|
- drawer: { // optional, add this if you want a side menu drawer in your app
|
108
|
|
- left: { // optional, define if you want a drawer from the left
|
109
|
|
- screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
|
110
|
|
- },
|
111
|
|
- disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
|
112
|
|
- }
|
|
39
|
+ screen: {
|
|
40
|
+ screen: 'example.LoginScreen',
|
|
41
|
+ title: 'Login',
|
|
42
|
+ navigatorStyle: {}
|
|
43
|
+ },
|
|
44
|
+ passProps: {
|
|
45
|
+ str: 'This is a prop passed in \'startSingleScreenApp()\'!',
|
|
46
|
+ obj: {
|
|
47
|
+ str: 'This is a prop passed in an object!',
|
|
48
|
+ arr: [
|
|
49
|
+ {
|
|
50
|
+ str: 'This is a prop in an object in an array in an object!'
|
|
51
|
+ }
|
|
52
|
+ ],
|
|
53
|
+ arr2: [
|
|
54
|
+ [
|
|
55
|
+ 'array of strings',
|
|
56
|
+ 'with two strings'
|
|
57
|
+ ],
|
|
58
|
+ [
|
|
59
|
+ 1, 2, 3
|
|
60
|
+ ]
|
|
61
|
+ ]
|
|
62
|
+ },
|
|
63
|
+ num: 1234,
|
|
64
|
+ fn: function() {
|
|
65
|
+ return 'Hello from a function!';
|
|
66
|
+ }
|
|
67
|
+ }
|
113
|
68
|
});
|
|
69
|
+ // Navigation.startSingleScreenApp({
|
|
70
|
+ // screen: {
|
|
71
|
+ // screen: 'example.FirstTabScreen',
|
|
72
|
+ // title: 'Login',
|
|
73
|
+ // topTabs: [
|
|
74
|
+ // {
|
|
75
|
+ // screenId: 'example.ListScreen',
|
|
76
|
+ // title: 'Tab1',
|
|
77
|
+ // passProps: {
|
|
78
|
+ // str: 'This is a prop passed to Tab1'
|
|
79
|
+ // }
|
|
80
|
+ // },
|
|
81
|
+ // {
|
|
82
|
+ // screenId: 'example.PushedScreen',
|
|
83
|
+ // title: 'Tab2',
|
|
84
|
+ // passProps: {
|
|
85
|
+ // str: 'This is a prop passed to Tab2'
|
|
86
|
+ // }
|
|
87
|
+ //
|
|
88
|
+ // },
|
|
89
|
+ // {
|
|
90
|
+ // screenId: 'example.PushedScreen',
|
|
91
|
+ // title: 'Tab3',
|
|
92
|
+ // passProps: {
|
|
93
|
+ // str: 'This is a prop passed to Tab3'
|
|
94
|
+ // }
|
|
95
|
+ // },
|
|
96
|
+ // {
|
|
97
|
+ // screenId: 'example.FirstTabScreen',
|
|
98
|
+ // title: 'Tab4',
|
|
99
|
+ // passProps: {
|
|
100
|
+ // str: 'This is a prop passed to Tab4',
|
|
101
|
+ // fn: () => 'Hello from a function passed as passProps!'
|
|
102
|
+ // }
|
|
103
|
+ // }
|
|
104
|
+ // ],
|
|
105
|
+ // navigatorStyle: {}
|
|
106
|
+ // },
|
|
107
|
+ // drawer: { // optional, add this if you want a side menu drawer in your app
|
|
108
|
+ // left: { // optional, define if you want a drawer from the left
|
|
109
|
+ // screen: 'example.SideMenu' // unique ID registered with Navigation.registerScreen
|
|
110
|
+ // },
|
|
111
|
+ // disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
|
|
112
|
+ // }
|
|
113
|
+ // });
|
114
|
114
|
return;
|
115
|
115
|
case 'after-login':
|
116
|
116
|
Navigation.startTabBasedApp({
|
|
@@ -121,7 +121,7 @@ export default class App {
|
121
|
121
|
icon: require('../img/one.png'),
|
122
|
122
|
selectedIcon: require('../img/one_selected.png'),
|
123
|
123
|
title: 'Screen One',
|
124
|
|
- navigatorStyle: {},
|
|
124
|
+ navigatorStyle: {}
|
125
|
125
|
},
|
126
|
126
|
{
|
127
|
127
|
label: 'Two',
|
|
@@ -129,7 +129,7 @@ export default class App {
|
129
|
129
|
icon: require('../img/two.png'),
|
130
|
130
|
selectedIcon: require('../img/two_selected.png'),
|
131
|
131
|
title: 'Screen Two',
|
132
|
|
- navigatorStyle: {},
|
|
132
|
+ navigatorStyle: {}
|
133
|
133
|
}
|
134
|
134
|
],
|
135
|
135
|
passProps: {
|
|
@@ -145,7 +145,13 @@ export default class App {
|
145
|
145
|
num: 1234
|
146
|
146
|
},
|
147
|
147
|
animationType: 'slide-down',
|
148
|
|
- title: 'Redux Example'
|
|
148
|
+ title: 'Redux Example',
|
|
149
|
+ drawer: { // optional, add this if you want a side menu drawer in your app
|
|
150
|
+ left: { // optional, define if you want a drawer from the left
|
|
151
|
+ screen: 'example.BottomTabsSideMenu' // unique ID registered with Navigation.registerScreen
|
|
152
|
+ },
|
|
153
|
+ disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
|
|
154
|
+ }
|
149
|
155
|
});
|
150
|
156
|
return;
|
151
|
157
|
default:
|