|
@@ -0,0 +1,85 @@
|
|
1
|
+const React = require('react');
|
|
2
|
+const { Component } = require('react');
|
|
3
|
+const {
|
|
4
|
+ View,
|
|
5
|
+ ScrollView,
|
|
6
|
+ Dimensions,
|
|
7
|
+ StyleSheet,
|
|
8
|
+ Image,
|
|
9
|
+ Text,
|
|
10
|
+ Platform,
|
|
11
|
+ TouchableHighlight,
|
|
12
|
+ TextInput
|
|
13
|
+} = require('react-native');
|
|
14
|
+
|
|
15
|
+const testIDs = require('../testIDs');
|
|
16
|
+const Button = require('./Button');
|
|
17
|
+
|
|
18
|
+const { Navigation } = require('react-native-navigation');
|
|
19
|
+let screenWidth = Dimensions.get('window').width;
|
|
20
|
+const LOREM_IPSUM = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis' +
|
|
21
|
+ 'nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum' +
|
|
22
|
+ 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
|
|
23
|
+
|
|
24
|
+class KeyboardScreen extends Component {
|
|
25
|
+ static get options() {
|
|
26
|
+ return {
|
|
27
|
+ bottomTabs: {
|
|
28
|
+ drawBehind: true,
|
|
29
|
+ },
|
|
30
|
+ topBar: {
|
|
31
|
+ title: {
|
|
32
|
+ text: 'Keyboard'
|
|
33
|
+ }
|
|
34
|
+ }
|
|
35
|
+ };
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ render() {
|
|
39
|
+ return (
|
|
40
|
+ <View style={styles.root}>
|
|
41
|
+ <ScrollView>
|
|
42
|
+ <Image style={styles.image} source={require('../../img/2048.jpeg')} />
|
|
43
|
+ <Text style={{margin: 8}}>Keyboard e2e</Text>
|
|
44
|
+ <TextInput placeholder='Input 1'/>
|
|
45
|
+ <TextInput
|
|
46
|
+ placeholder='Input 2'
|
|
47
|
+ onFocus={this.hideTabs}
|
|
48
|
+ onBlur={this.showTabs}
|
|
49
|
+ />
|
|
50
|
+ {/* <Text>{LOREM_IPSUM}</Text> */}
|
|
51
|
+ </ScrollView>
|
|
52
|
+ </View>
|
|
53
|
+ );
|
|
54
|
+ }
|
|
55
|
+
|
|
56
|
+ hideTabs = () => {
|
|
57
|
+ Navigation.mergeOptions(this.props.componentId, {
|
|
58
|
+ bottomTabs: {
|
|
59
|
+ visible: false
|
|
60
|
+ }
|
|
61
|
+ });
|
|
62
|
+ }
|
|
63
|
+
|
|
64
|
+ showTabs = () => {
|
|
65
|
+ Navigation.mergeOptions(this.props.componentId, {
|
|
66
|
+ bottomTabs: {
|
|
67
|
+ visible: true
|
|
68
|
+ }
|
|
69
|
+ });
|
|
70
|
+ }
|
|
71
|
+}
|
|
72
|
+
|
|
73
|
+module.exports = KeyboardScreen;
|
|
74
|
+
|
|
75
|
+const styles = StyleSheet.create({
|
|
76
|
+ root: {
|
|
77
|
+ flex: 1,
|
|
78
|
+ backgroundColor: '#E3DCC3'
|
|
79
|
+ },
|
|
80
|
+ image: {
|
|
81
|
+ height: 400,
|
|
82
|
+ width: screenWidth,
|
|
83
|
+ resizeMode: 'cover'
|
|
84
|
+ }
|
|
85
|
+});
|