소스 검색

Add LightBox to example app on Android (#982)

Guy Carmeli 7 년 전
부모
커밋
9042ad551a
3개의 변경된 파일6개의 추가작업 그리고 8개의 파일을 삭제
  1. 3
    6
      example/src/screens/FirstTabScreen.js
  2. 1
    2
      example/src/screens/LightBoxScreen.js
  3. 2
    0
      example/src/screens/index.android.js

+ 3
- 6
example/src/screens/FirstTabScreen.js 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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
 }