2018-01-29 01:42:29 -05:00
|
|
|
import React from 'react'
|
|
|
|
|
import { ScrollView, StatusBar, StyleSheet, Text, View } from 'react-native'
|
2018-03-17 20:21:58 -04:00
|
|
|
import Icon from './Icons/Icon'
|
2018-01-29 01:42:29 -05:00
|
|
|
import Section from './Section'
|
|
|
|
|
import PriorityExample from './PriorityExample'
|
|
|
|
|
import GifExample from './GifExample'
|
2018-01-30 20:13:30 -05:00
|
|
|
import BorderRadiusExample from './BorderRadiusExample'
|
2018-01-29 01:42:29 -05:00
|
|
|
import FeatureText from './FeatureText'
|
|
|
|
|
import ProgressExample from './ProgressExample'
|
|
|
|
|
import PreloadExample from './PreloadExample'
|
2018-05-09 22:52:03 -04:00
|
|
|
import ResizeModeExample from './ResizeModeExample'
|
2018-06-09 22:12:56 -04:00
|
|
|
import LocalImagesExample from './LocalImagesExample'
|
2018-01-30 20:24:45 -05:00
|
|
|
import StatusBarUnderlay, { STATUS_BAR_HEIGHT } from './StatusBarUnderlay'
|
2018-01-29 01:42:29 -05:00
|
|
|
|
|
|
|
|
const FastImageExample = () => (
|
2018-05-06 19:04:28 -04:00
|
|
|
<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 />
|
|
|
|
|
<BorderRadiusExample />
|
|
|
|
|
<ProgressExample />
|
|
|
|
|
<PreloadExample />
|
2018-05-09 22:52:03 -04:00
|
|
|
<ResizeModeExample />
|
2018-06-09 22:12:56 -04:00
|
|
|
<LocalImagesExample />
|
2018-05-06 19:04:28 -04:00
|
|
|
</View>
|
|
|
|
|
</ScrollView>
|
|
|
|
|
<StatusBarUnderlay />
|
|
|
|
|
</View>
|
2018-01-29 01:42:29 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
FastImageExample.navigationOptions = {
|
2018-05-06 19:04:28 -04:00
|
|
|
tabBarLabel: 'FastImage Example',
|
|
|
|
|
tabBarIcon: props => (
|
|
|
|
|
<Icon
|
|
|
|
|
name="ios-information-circle-outline"
|
|
|
|
|
focusedName="ios-information-circle"
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
),
|
2018-01-29 01:42:29 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
2018-05-06 19:04:28 -04:00
|
|
|
titleText: {
|
|
|
|
|
fontWeight: '900',
|
|
|
|
|
marginBottom: 20,
|
|
|
|
|
color: '#222',
|
|
|
|
|
},
|
|
|
|
|
contentContainer: {
|
|
|
|
|
marginTop: 20,
|
|
|
|
|
},
|
|
|
|
|
image: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
height: 100,
|
|
|
|
|
backgroundColor: '#ddd',
|
|
|
|
|
margin: 10,
|
|
|
|
|
},
|
|
|
|
|
container: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
alignItems: 'stretch',
|
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
|
},
|
|
|
|
|
scrollContainer: {
|
|
|
|
|
marginTop: STATUS_BAR_HEIGHT,
|
|
|
|
|
},
|
|
|
|
|
scrollContentContainer: {
|
|
|
|
|
alignItems: 'stretch',
|
|
|
|
|
flex: 0,
|
|
|
|
|
},
|
2018-01-29 01:42:29 -05:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default FastImageExample
|