This repository was archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
101 lines (100 loc) · 3.76 KB
/
App.js
File metadata and controls
101 lines (100 loc) · 3.76 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import React from 'react';
import {ScrollView, StyleSheet, Text, View} from 'react-native';
import {XBackComponent, XText} from "./widget/component/index";
import {
ScreenXCardName,
ScreenXFlatListName,
ScreenXImageName,
ScreenXLoadingName,
ScreenXModalName,
ScreenXSectionListName,
ScreenXStatusName,
ScreenXTabName,
ScreenXTextButtonName,
ScreenXTextName,
ScreenXToolBarName,
ScreenXTouchName
} from "./app/code/String";
import {fixStatusBarHeight, screenW} from "./widget/component/lib/helper/Screen";
export default class App extends XBackComponent {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>{'已经添加的组件'}</Text>
<ScrollView>
<XText
onPress={() => this.props.navigation.navigate(ScreenXTouchName)}
text={'XTouch'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXTextName)}
text={'XText'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXImageName)}
text={'XImage'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXCardName)}
text={'XCard'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXTextButtonName)}
text={'XTextButton'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXStatusName)}
text={'XStatus'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXModalName)}
text={'XModal'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXLoadingName)}
text={'XLoading'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXToolBarName)}
text={'XToolBar'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXFlatListName)}
text={'XFlatList'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXSectionListName)}
text={'XSectionList'}
textStyle={styles.item}/>
<XText
onPress={() => this.props.navigation.navigate(ScreenXTabName)}
text={'XTab'}
textStyle={styles.item}/>
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
backgroundColor: 'white',
paddingTop: fixStatusBarHeight,
},
title: {
padding: 10,
fontSize: 18,
margin: 8,
textAlign: 'center'
},
item: {
marginBottom: 8,
padding: 8,
textAlign: 'center',
backgroundColor: 'gray',
width: screenW,
fontSize: 18,
color: 'white',
},
});