-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
AbhinavJain13/react-native
#41Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
I'm attempting to make an image full-width and came across a few stackoverflow questions related where the top upvoted answer was to use flexbox similarly to how i'm using it below. Although it doesn't seem to display the image unless i set static widths on my styles property. Any ideas?
var styles = StyleSheet.create({
canvasContainer: {
flex:1,
alignItems: 'stretch'
},
canvas: {
flex:1
// width: 200,
// height: 200
}
});render: function() {
return (
<View style={styles.container}>
<View style={styles.canvasContainer}>
<Image
source={{uri: 'http://imgs.steps.dragoart.com/how-to-draw-a-pony-step-7_1_000000053055_5.jpg'}}
style={styles.canvas} />
</View>
<ScrollView
style={styles.scrollView}
scrollEventThrottle={200}
contentInset={{top: 0}}
>
{this.state.messages.map(m => {
return <Text style={styles.message}>Josh: {m}</Text>
})}
</ScrollView>
</View>
)
}KlimczakM
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.