2018-01-29 06:42:29 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'
|
|
|
|
import Icon from 'react-native-vector-icons/Ionicons'
|
|
|
|
import Section from './Section'
|
|
|
|
import PriorityExample from './PriorityExample'
|
|
|
|
import GifExample from './GifExample'
|
2018-01-31 01:13:30 +00:00
|
|
|
import BorderRadiusExample from './BorderRadiusExample'
|
2018-01-29 06:42:29 +00:00
|
|
|
import FeatureText from './FeatureText'
|
|
|
|
import ProgressExample from './ProgressExample'
|
|
|
|
import PreloadExample from './PreloadExample'
|
2018-01-31 01:24:45 +00:00
|
|
|
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
2018-01-29 06:42:29 +00:00
|
|
|
|
|
|
|
const FastImageExample = () => (
|
|
|
|
<View style={styles.container}>
|
|
|
|
<StatusBar
|
|
|
|
translucent
|
|
|
|
barStyle="dark-content"
|
|
|
|
backgroundColor="transparent"
|
|
|
|
/>
|
|
|
|
<ScrollView
|
|
|
|
style={styles.scrollContainer}
|
|
|
|
contentContainerStyle={styles.scrollContentContainer}
|
|
|
|
>
|
|
|
|
<View style={styles.contentContainer}>
|
|
|
|
<Section>
|
|
|
|
<Text style={styles.titleText}>🚩 FastImage</Text>
|
|
|
|
<FeatureText text="Tap images to reload examples." />
|
|
|
|
</Section>
|
|
|
|
<PriorityExample />
|
|
|
|
<GifExample />
|
2018-01-31 01:13:30 +00:00
|
|
|
<BorderRadiusExample />
|
2018-01-29 06:42:29 +00:00
|
|
|
<ProgressExample />
|
|
|
|
<PreloadExample />
|
|
|
|
</View>
|
|
|
|
</ScrollView>
|
2018-01-31 01:24:45 +00:00
|
|
|
<StatusBarUnderlay />
|
2018-01-29 06:42:29 +00:00
|
|
|
</View>
|
|
|
|
)
|
|
|
|
|
|
|
|
FastImageExample.navigationOptions = {
|
|
|
|
tabBarLabel: 'FastImage Example',
|
|
|
|
tabBarIcon: ({ focused, tintColor }) => {
|
|
|
|
const name = focused
|
|
|
|
? 'ios-information-circle'
|
|
|
|
: 'ios-information-circle-outline'
|
|
|
|
return <Icon name={name} size={26} color={tintColor} />
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
titleText: {
|
|
|
|
fontWeight: '900',
|
|
|
|
marginBottom: 20,
|
|
|
|
color: '#222',
|
|
|
|
},
|
|
|
|
contentContainer: {
|
2018-01-31 01:24:45 +00:00
|
|
|
marginTop: 20,
|
2018-01-29 06:42:29 +00:00
|
|
|
marginBottom: 20,
|
|
|
|
},
|
|
|
|
image: {
|
|
|
|
flex: 1,
|
|
|
|
height: 100,
|
|
|
|
backgroundColor: '#ddd',
|
|
|
|
margin: 10,
|
|
|
|
},
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
alignItems: 'stretch',
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
},
|
2018-01-31 01:24:45 +00:00
|
|
|
scrollContainer: {
|
|
|
|
marginTop: STATUS_BAR_HEIGHT,
|
|
|
|
},
|
2018-01-29 06:42:29 +00:00
|
|
|
scrollContentContainer: {
|
|
|
|
alignItems: 'stretch',
|
|
|
|
flex: 0,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
export default FastImageExample
|