Bladeren bron

Add LightBox to example app on Android (#982)

Guy Carmeli 7 jaren geleden
bovenliggende
commit
9042ad551a

+ 3
- 6
example/src/screens/FirstTabScreen.js Bestand weergeven

@@ -73,12 +73,9 @@ export default class FirstTabScreen extends Component {
73 73
           <Text style={styles.button}>Show Modal Screen</Text>
74 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 81
           Platform.OS === 'ios' ?

+ 1
- 2
example/src/screens/LightBoxScreen.js Bestand weergeven

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

+ 2
- 0
example/src/screens/index.android.js Bestand weergeven

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