Skip to content

Commit

Permalink
ImageBackground is the new proper component to use here
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Malmed committed Feb 8, 2018
1 parent ffad1c8 commit 225e563
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/Onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import {
Animated,
Image,
ImageBackground,
StatusBar,
View
} from 'react-native'
Expand Down Expand Up @@ -59,7 +60,7 @@ class Onboarding extends React.Component {
var requiredImage = this.getRandomImage(images)

return (
<Image source={requiredImage} style={styles.container}>
<ImageBackground source={requiredImage} style={styles.container}>
<View style={styles.logoContainer}>
<Image source={require('../../images/logo.png')} style={styles.logo} />
<StyledText
Expand All @@ -75,8 +76,7 @@ class Onboarding extends React.Component {
text={'Get Started'} />
</Animated.View>
</View>

</Image>
</ImageBackground>
);
}
}
Expand All @@ -85,8 +85,6 @@ const styles = EStyleSheet.create({
container: {
backgroundColor: 'black',
flex: 1,
width: null,
height: null,
},
logoContainer: {
flex: 1,
Expand All @@ -112,8 +110,8 @@ const styles = EStyleSheet.create({
width: '80%',
},
footerContainer: {
position: 'absolute',
bottom: 50,
alignSelf: 'flex-end',
paddingBottom: 50,
flex: 1,
flexDirection: 'column',
alignItems: 'center',
Expand All @@ -131,7 +129,8 @@ const styles = EStyleSheet.create({
color: '$darkTeal',
fontFamily: 'OpenSans-Semibold',
fontSize: 22,
letterSpacing: 1
letterSpacing: 1,
textAlign: 'center',
}


Expand Down

0 comments on commit 225e563

Please sign in to comment.