瀏覽代碼

Update example project

Changed screen that is displayed when `resetTo` is called
Guy Carmeli 8 年之前
父節點
當前提交
7412eef2c7
共有 3 個文件被更改,包括 16 次插入14 次删除
  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 查看文件

@@ -12,17 +12,7 @@ Navigation.startTabBasedApp({
12 12
       screen: 'example.FirstTabScreen',
13 13
       icon: require('../img/one.png'),
14 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 18
       label: 'Two',
@@ -34,7 +24,12 @@ Navigation.startTabBasedApp({
34 24
         tabBarBackgroundColor: '#4dbce9',
35 25
       }
36 26
     }
37
-  ]
27
+  ],
28
+  drawer: {
29
+    left: {
30
+      screen: 'example.SideMenu'
31
+    }
32
+  }
38 33
 });
39 34
 // Navigation.startSingleScreenApp({
40 35
 //   screen: {

+ 8
- 1
example/src/screens/FirstTabScreen.js 查看文件

@@ -26,7 +26,14 @@ export default class FirstTabScreen extends Component {
26 26
     ]
27 27
   };
28 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 39
   constructor(props) {

+ 1
- 1
example/src/screens/PushedScreen.js 查看文件

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