Created
July 31, 2018 23:47
-
-
Save mauriciopazpp/9f973f9c81eeca38ff5274ecfcdf01de to your computer and use it in GitHub Desktop.
Insert image using the width size of phone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_renderImage(image) { | |
let contentHeight = scaleModerate(375, 1) | |
let height = Dimensions.get('window').height - contentHeight | |
let width = Dimensions.get('window').width | |
image = (<Image style={[style.image, {height, width}]} | |
source={ backgroundImg }/>) | |
return image | |
} | |
render() { | |
let image = this._renderImage() | |
return ( | |
<RkAvoidKeyboard | |
onStartShouldSetResponder={ (e) => true } | |
onResponderRelease={ (e) => Keyboard.dismiss() } | |
style={ style.screen }> | |
{ image } | |
//... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment