Daniel Zlotin 8 anni fa
parent
commit
bf79a6d1a7

+ 2
- 2
.npmignore Vedi File

@@ -1,5 +1,5 @@
1
-example/
2
-example-redux/
1
+example
2
+old-example-redux
3 3
 
4 4
 test/
5 5
 res/generated/

+ 9
- 1
example/src/screens/FirstTabScreen.js Vedi File

@@ -28,11 +28,13 @@ export default class FirstTabScreen extends Component {
28 28
   static navigatorStyle = {
29 29
     drawUnderTabBar: true
30 30
   };
31
+
31 32
   constructor(props) {
32 33
     super(props);
33 34
     // if you want to listen on navigator events, set this up
34 35
     this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
35 36
   }
37
+
36 38
   onNavigatorEvent(event) {
37 39
     if (event.id == 'menu') {
38 40
       this.props.navigator.toggleDrawer({
@@ -47,6 +49,7 @@ export default class FirstTabScreen extends Component {
47 49
       AlertIOS.alert('NavBar', 'Add button pressed');
48 50
     }
49 51
   }
52
+
50 53
   render() {
51 54
     return (
52 55
       <View style={{flex: 1, padding: 20}}>
@@ -74,24 +77,28 @@ export default class FirstTabScreen extends Component {
74 77
       </View>
75 78
     );
76 79
   }
80
+
77 81
   onPushPress() {
78 82
     this.props.navigator.push({
79 83
       title: "More",
80 84
       screen: "example.PushedScreen"
81 85
     });
82 86
   }
87
+
83 88
   onPushStyledPress() {
84 89
     this.props.navigator.push({
85 90
       title: "Styled",
86 91
       screen: "example.StyledScreen"
87 92
     });
88 93
   }
94
+
89 95
   onModalPress() {
90 96
     this.props.navigator.showModal({
91 97
       title: "Modal",
92 98
       screen: "example.ModalScreen"
93 99
     });
94 100
   }
101
+
95 102
   onLightBoxPress() {
96 103
     this.props.navigator.showLightBox({
97 104
       screen: "example.LightBoxScreen",
@@ -100,6 +107,7 @@ export default class FirstTabScreen extends Component {
100 107
       }
101 108
     });
102 109
   }
110
+
103 111
   onInAppNotificationPress() {
104 112
     this.props.navigator.showInAppNotification({
105 113
       screen: "example.NotificationScreen"
@@ -112,7 +120,7 @@ const styles = StyleSheet.create({
112 120
     textAlign: 'center',
113 121
     fontSize: 18,
114 122
     marginBottom: 10,
115
-    marginTop:10,
123
+    marginTop: 10,
116 124
     color: 'blue'
117 125
   }
118 126
 });

+ 1
- 4
example/src/screens/index.android.js Vedi File

@@ -1,13 +1,10 @@
1
-import { Navigation } from 'react-native-navigation';
1
+import {Navigation} from 'react-native-navigation';
2 2
 
3 3
 import FirstTabScreen from './FirstTabScreen';
4 4
 import SecondTabScreen from './SecondTabScreen';
5 5
 import ThirdTabScreen from './ThirdTabScreen';
6 6
 import PushedScreen from './PushedScreen';
7 7
 import StyledScreen from './StyledScreen';
8
-import ModalScreen from './ModalScreen';
9
-import LightBoxScreen from './LightBoxScreen';
10
-import NotificationScreen from './NotificationScreen'
11 8
 import SideMenu from './SideMenu';
12 9
 
13 10
 // register all screens of the app (including internal ones)