Browse Source

Add LightBox to example app on Android (#982)

Guy Carmeli 7 years ago
parent
commit
9042ad551a

+ 3
- 6
example/src/screens/FirstTabScreen.js View File

73
           <Text style={styles.button}>Show Modal Screen</Text>
73
           <Text style={styles.button}>Show Modal Screen</Text>
74
         </TouchableOpacity>
74
         </TouchableOpacity>
75
 
75
 
76
-        {
77
-          Platform.OS === 'ios' ?
78
-            <TouchableOpacity onPress={ this.onLightBoxPress.bind(this) }>
79
-              <Text style={styles.button}>Show LightBox</Text>
80
-            </TouchableOpacity> : false
81
-        }
76
+        <TouchableOpacity onPress={ this.onLightBoxPress.bind(this) }>
77
+          <Text style={styles.button}>Show LightBox</Text>
78
+        </TouchableOpacity>
82
 
79
 
83
         {
80
         {
84
           Platform.OS === 'ios' ?
81
           Platform.OS === 'ios' ?

+ 1
- 2
example/src/screens/LightBoxScreen.js View File

34
   }
34
   }
35
 }
35
 }
36
 
36
 
37
-var styles = StyleSheet.create({
37
+const styles = StyleSheet.create({
38
   container: {
38
   container: {
39
-    flex: 1,
40
     width: Dimensions.get('window').width * 0.8,
39
     width: Dimensions.get('window').width * 0.8,
41
     justifyContent: 'center',
40
     justifyContent: 'center',
42
     alignItems: 'center',
41
     alignItems: 'center',

+ 2
- 0
example/src/screens/index.android.js View File

8
 import ModalScreen from './ModalScreen';
8
 import ModalScreen from './ModalScreen';
9
 import CollapsingTopBarScreen from './CollapsingTopBarScreen';
9
 import CollapsingTopBarScreen from './CollapsingTopBarScreen';
10
 import InAppNotification from './InAppNotification';
10
 import InAppNotification from './InAppNotification';
11
+import LightBoxScreen from './LightBoxScreen';
11
 
12
 
12
 // register all screens of the app (including internal ones)
13
 // register all screens of the app (including internal ones)
13
 export function registerScreens() {
14
 export function registerScreens() {
19
   Navigation.registerComponent('example.SideMenu', () => SideMenu);
20
   Navigation.registerComponent('example.SideMenu', () => SideMenu);
20
   Navigation.registerComponent('example.CollapsingTopBarScreen', () => CollapsingTopBarScreen);
21
   Navigation.registerComponent('example.CollapsingTopBarScreen', () => CollapsingTopBarScreen);
21
   Navigation.registerComponent('example.InAppNotification', () => InAppNotification);
22
   Navigation.registerComponent('example.InAppNotification', () => InAppNotification);
23
+  Navigation.registerComponent('example.LightBoxScreen', () => LightBoxScreen);
22
 }
24
 }