forked from FidMe/react-native-photo-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSlide.js
41 lines (39 loc) · 1 KB
/
Slide.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
import { ActivityIndicator, Dimensions, View } from 'react-native';
import PhotoView from 'react-native-photo-view';
import React, { Component } from 'react';
const styles = {
slideC: {
backgroundColor: '#F1F1F1',
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
scrollViewC: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height - 128,
alignItems: 'center',
justifyContent: 'center',
},
loader: {
position: 'absolute',
top: (Dimensions.get('window').height / 2) - 10,
left: (Dimensions.get('window').width / 2) - 10,
},
};
export class Slide extends Component {
render() {
return (
<View style={styles.slideC}>
<ActivityIndicator style={styles.loader} />
<PhotoView
source={this.props.item.image}
maximumZoomScale={3}
zoomScale={1}
androidScaleType="center"
resizeMode="contain"
style={styles.scrollViewC}
/>
</View>
);
}
}