|
@@ -0,0 +1,69 @@
|
|
1
|
+const React = require('react');
|
|
2
|
+const { PureComponent } = require('react');
|
|
3
|
+
|
|
4
|
+const { Text, Button, View, Alert, Platform ,ScrollView} = require('react-native');
|
|
5
|
+const { Navigation } = require('react-native-navigation');
|
|
6
|
+
|
|
7
|
+const testIDs = require('../../testIDs');
|
|
8
|
+
|
|
9
|
+class CustomDialogWithScroll extends PureComponent {
|
|
10
|
+ static options() {
|
|
11
|
+ return {
|
|
12
|
+ statusBarBackgroundColor: 'green'
|
|
13
|
+ };
|
|
14
|
+ }
|
|
15
|
+
|
|
16
|
+ render() {
|
|
17
|
+ return (
|
|
18
|
+ <View style={styles.container}>
|
|
19
|
+ <ScrollView style={styles.root}>
|
|
20
|
+ <View style={{height: 60, backgroundColor: 'red'}}/>
|
|
21
|
+ <View style={{height: 60, backgroundColor: 'green'}}/>
|
|
22
|
+ <View style={{height: 60, backgroundColor: 'red'}}/>
|
|
23
|
+ <View style={{height: 60, backgroundColor: 'green'}}/>
|
|
24
|
+ <View style={{height: 60, backgroundColor: 'red'}}/>
|
|
25
|
+ <View style={{height: 60, backgroundColor: 'green'}}/>
|
|
26
|
+ </ScrollView>
|
|
27
|
+ </View>
|
|
28
|
+ );
|
|
29
|
+ }
|
|
30
|
+
|
|
31
|
+ didDisappear() {
|
|
32
|
+ if (Platform.OS === 'android') {
|
|
33
|
+ Alert.alert('Overlay disappeared');
|
|
34
|
+ }
|
|
35
|
+ }
|
|
36
|
+}
|
|
37
|
+
|
|
38
|
+const styles = {
|
|
39
|
+ root: {
|
|
40
|
+ width: 400,
|
|
41
|
+ height: 200,
|
|
42
|
+ },
|
|
43
|
+ container: {
|
|
44
|
+
|
|
45
|
+ width: 400,
|
|
46
|
+ height: 200,
|
|
47
|
+ flexDirection: 'column',
|
|
48
|
+ justifyContent: 'center',
|
|
49
|
+ alignItems: 'center',
|
|
50
|
+ alignSelf: 'center'
|
|
51
|
+ },
|
|
52
|
+ h1: {
|
|
53
|
+ fontSize: 24,
|
|
54
|
+ textAlign: 'center',
|
|
55
|
+ margin: 10
|
|
56
|
+ },
|
|
57
|
+ h2: {
|
|
58
|
+ fontSize: 12,
|
|
59
|
+ textAlign: 'center',
|
|
60
|
+ margin: 10
|
|
61
|
+ },
|
|
62
|
+ footer: {
|
|
63
|
+ fontSize: 10,
|
|
64
|
+ color: '#888',
|
|
65
|
+ marginTop: 10
|
|
66
|
+ }
|
|
67
|
+};
|
|
68
|
+
|
|
69
|
+module.exports = CustomDialogWithScroll;
|