Browse Source

Update example project

Changed screen that is displayed when `resetTo` is called
Guy Carmeli 8 years ago
parent
commit
7412eef2c7
3 changed files with 16 additions and 14 deletions
  1. 7
    12
      example/src/app.js
  2. 8
    1
      example/src/screens/FirstTabScreen.js
  3. 1
    1
      example/src/screens/PushedScreen.js

+ 7
- 12
example/src/app.js View File

12
       screen: 'example.FirstTabScreen',
12
       screen: 'example.FirstTabScreen',
13
       icon: require('../img/one.png'),
13
       icon: require('../img/one.png'),
14
       selectedIcon: require('../img/one_selected.png'),
14
       selectedIcon: require('../img/one_selected.png'),
15
-      title: 'Screen One',
16
-      navigatorStyle: {
17
-        navBarBackgroundColor: '#4dbce9',
18
-        navBarTextColor: '#ffff00',
19
-        navBarSubtitleTextColor: '#ff0000',
20
-        navBarButtonColor: '#ffffff',
21
-        statusBarTextColorScheme: 'light',
22
-        tabBarBackgroundColor: '#4dbce9',
23
-        tabBarButtonColor: '#ffffff',
24
-        tabBarSelectedButtonColor: '#ffff00'
25
-      }
15
+      title: 'Screen One'
26
     },
16
     },
27
     {
17
     {
28
       label: 'Two',
18
       label: 'Two',
34
         tabBarBackgroundColor: '#4dbce9',
24
         tabBarBackgroundColor: '#4dbce9',
35
       }
25
       }
36
     }
26
     }
37
-  ]
27
+  ],
28
+  drawer: {
29
+    left: {
30
+      screen: 'example.SideMenu'
31
+    }
32
+  }
38
 });
33
 });
39
 // Navigation.startSingleScreenApp({
34
 // Navigation.startSingleScreenApp({
40
 //   screen: {
35
 //   screen: {

+ 8
- 1
example/src/screens/FirstTabScreen.js View File

26
     ]
26
     ]
27
   };
27
   };
28
   static navigatorStyle = {
28
   static navigatorStyle = {
29
-    drawUnderTabBar: true
29
+      navBarBackgroundColor: '#4dbce9',
30
+      navBarTextColor: '#ffff00',
31
+      navBarSubtitleTextColor: '#ff0000',
32
+      navBarButtonColor: '#ffffff',
33
+      statusBarTextColorScheme: 'light',
34
+      tabBarBackgroundColor: '#4dbce9',
35
+      tabBarButtonColor: '#ffffff',
36
+      tabBarSelectedButtonColor: '#ffff00'
30
   };
37
   };
31
 
38
 
32
   constructor(props) {
39
   constructor(props) {

+ 1
- 1
example/src/screens/PushedScreen.js View File

60
   onResetToPress() {
60
   onResetToPress() {
61
     this.props.navigator.resetTo({
61
     this.props.navigator.resetTo({
62
       title: "New Root",
62
       title: "New Root",
63
-      screen: "example.PushedScreen"
63
+      screen: "example.FirstTabScreen"
64
     });
64
     });
65
   }
65
   }
66
 }
66
 }