-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_setup.js
113 lines (98 loc) · 3.7 KB
/
common_setup.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
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
102
103
104
105
106
107
108
109
110
111
112
113
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, {Component} from 'react';
import {
StyleSheet,
Text,
View,
TouchableHighlight
} from 'react-native';
import MoveList from './learn/index_demo_movelist';
import HelloText from './learn/index14_create_component';
import LifecycleComponent from './learn/index15_lifecycle'
import LifeCycleWrapper from './learn/index15_lifecycle2'
import NetTest from './learn/index16_net'
import FlatTest from './learn/index17_FlatList'
import {SimpleApp} from './learn/index18_ReactNavigation'
import {TabTest} from './learn/index19_NestingNavigators'
import {MyApp} from './learn/index20_TabRouter'
import {addNavigationHelpers} from 'react-navigation';
import {StackTest1} from './learn/index21_StackNavigator'
import SimpleStack from './learn/index21_StackNavigator_21'
import ModalStack from "./learn/index21_StackNavigator_22"
import TabNaviTest1 from './learn/index22_TabNavigator'
import TabMyBills from './learn/my_bills_list'
import LoadingFooter, {STATUS_EMPTY, STATUS_ERROR, STATUS_LOADING, STATUS_NORMAL} from "./learn/baselist/LoadingFooter";
export default class CommonSetup extends Component {
render() {
return (
<View style={styles.container}
>
{/*<HelloText
name="mcxtzhang"/>*/}
{/* <NetTest />*/}
{/* <FlatTest/>*/}
{/* <SimpleApp/>*/}
{/* <Text>我就在你上面咋的低了</Text>
<StackTest1 screenProps={{
//重要 ,传递参数给每个Screen
// this prop will get passed to the screen components as this.props.screenProps
params1: '参数1',
params2: "参数2",
...this.props
}}/>*/}
{/* <TabNaviTest1 screenProps={{
//重要 ,传递参数给每个Screen
// this prop will get passed to the screen components as this.props.screenProps
params1: '参数1',
params2: "参数2",
...this.props
}}
/>*/}
<LoadingFooter ref="loadingFooter" onRetryPressed={() => {
this.refs.loadingFooter.changeStatus(STATUS_LOADING)
}}/>
<TouchableHighlight onPress={() => {
this.refs.loadingFooter.changeStatus(STATUS_NORMAL)
}}>
<Text>点我Normal</Text>
</TouchableHighlight>
<TouchableHighlight onPress={() => {
this.refs.loadingFooter.changeStatus(STATUS_LOADING)
}}>
<Text>点我Loading</Text>
</TouchableHighlight>
<TouchableHighlight onPress={() => {
this.refs.loadingFooter.changeStatus(STATUS_EMPTY)
}}>
<Text>点我Empty</Text>
</TouchableHighlight>
<TouchableHighlight onPress={() => {
this.refs.loadingFooter.changeStatus(STATUS_ERROR)
}}>
<Text>点我Error</Text>
</TouchableHighlight>
<FlatTest/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});