i try create view image , text component wraps around image component.
my styling:
textcontainer: { flexdirection: 'row', }, text: { flex: 10, }, image: { flex:1, height: 180, width: 150, margin: 10, bordercolor: '#ccc', borderwidth: 1, }
my component:
<scrollview style={styles.contentcontainer} > {this.props.content.title_1 ? <text style={styles.title}>{this.props.content.title_1}</text> : null} <view style={styles.textcontainer}> {this.props.content.text_1 ? <text style={styles.text}>{this.props.content.text_1}</text> : null} {this.props.content.image_1 ? <image width={null} height={null} style={styles.image} source={this.props.content.image_1} /> : null} </view> </scrollview>
this result: (not wrapping @ haha)
in image beneath here, hacked little image text. can't text wrapped around..
i hope can me in right direction!
this hard there 1 weird way this.. try following. worked me place doing deep in other views.:
<text> <view style={{width:400, height:100, flex:1, flexdirection:'row'}}> <image source={require('')}/> <text>your content here</text> </view> </text>
good luck. please put comment letting know if worked.
Comments
Post a Comment