-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFlatItemCell.js
54 lines (50 loc) · 2.33 KB
/
FlatItemCell.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
import React from 'react';
import {View, TouchableOpacity} from "react-native";
const ContentItems = ["","","","","","","","","",""];
export default class FlatItemCell extends React.PureComponent {
// render() {
// return (
// <View style={{height: 150, backgroundColor: 'green', padding: 10}}>
// <View style={{flex: 1, backgroundColor: 'yellow', flexDirection: 'row'}}>
// {
// ContentItems.map((item, index) => {
// return (
// <View key={index} style={{flex: 1, backgroundColor: 'red', margin: 5}}/>
// )
// })
// }
// </View>
// <View style={{flex: 1, backgroundColor: 'blue', flexDirection: 'row'}}>
// {
// ContentItems.map((item, index) => {
// return (
// <View key={index} style={{flex: 1, backgroundColor: 'red', margin: 5}}/>
// )
// })
// }
// </View>
// <View style={{flex: 1, backgroundColor: 'gray', flexDirection: 'row'}}>
// {
// ContentItems.map((item, index) => {
// return (
// <View key={index} style={{flex: 1, backgroundColor: 'red', margin: 5}}/>
// )
// })
// }
// </View>
// </View>
// )
// }
render() {
return (
<TouchableOpacity style={{height: 80, paddingHorizontal: 10, marginBottom: 10, backgroundColor: 'white', flexDirection: 'row'}} onPress={() => {alert("abc")}}>
<View style={{backgroundColor: '#eee', width: 80, marginRight: 10, marginVertical: 3}}/>
<View style={{flex: 1}}>
<View style={{backgroundColor: '#eee', flex: 1, marginVertical: 3}}/>
<View style={{backgroundColor: '#eee', flex: 1, marginVertical: 3}}/>
<View style={{backgroundColor: '#eee', flex: 1, marginVertical: 3}}/>
</View>
</TouchableOpacity>
)
}
}