XnUploadLoading.js
1.63 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
/**
* Created by DEV005 on 2017/10/27.
*/
import React, { Component } from 'react';
import { BackHandler, AppState, StyleSheet, View, Text
, NativeModules, AsyncStorage, NavigationActions,
ActivityIndicator, TouchableOpacity, Image, Touch, Platform, Dimensions, Modal,
} from 'react-native';
import { getHeaderHeight, getHeaderPadding, xnBorderWidth } from '../utils/utils';
import { height, width } from '../utils/publiscStyle';
import PercentageCircle from 'react-native-percentage-circle';
const zoom = 750 / parseInt(Dimensions.get('window').width);
export default class xnLoading extends Component {
constructor(props) {
super(props);
this.state = {
};
}
componentDidMount() {
}
onRequestClose=() => {
}
render() {
return (
<View style={styles.xnLoading}>
<View style={styles.xnLoadingBd} >
<PercentageCircle radius={50 / zoom} percent={this.props.progressNum || 0} color={'#c72a15'} />
<Text style={styles.xnLoadingBdText}>上传中...</Text>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
xnLoading: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'transparent',
alignItems: 'center',
justifyContent: 'center',
},
xnLoadingBd: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
width: Dimensions.get('window').width / 2.5,
height: Dimensions.get('window').width / 2.5,
borderRadius: 20 / zoom,
backgroundColor: 'rgba(0, 0, 0, 0.25)',
},
xnLoadingBdText: {
marginLeft: 30 / zoom,
fontSize: 14,
color: '#fff',
},
});