-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
58 lines (49 loc) · 1.19 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import React from 'react';
import {
TextInput,
Keyboard,
KeyboardAvoidingView,
ScrollView,
FlatList,
Text,
View,
} from 'react-native';
const Item: () => React$Node = () => {
return (<Text>Hola</Text>);
};
const App: () => React$Node = () => {
// React.useEffect(() => {
// listener = Keyboard.addListener('keyboardDidHide', (event) => {
// console.log('keyboardDidHide');
// console.log(event.endCoordinates.screenY);
// });
// return () => {
// listener.remove();
// };
// });
return (
<KeyboardAvoidingView style={{
backgroundColor: 'red',
flex: 1
}} behavior='padding'>
<TextInput style={{backgroundColor: 'cyan', height: 35}}/>
<FlatList
renderItem={() => {
return (<Item/>);
}}
data={[0,1,2,3,4,5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10,5,6,7,8,9,10]}
>
</FlatList>
</KeyboardAvoidingView>
);
};
// App.options = {
// topBar: {
// title: {text: "Hola"},
// rightButtons: [{
// id: 'test',
// component: {name: 'Test'}
// }]
// }
// };
export default App;