Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

flexWrap not working for element in React Native

$
0
0

Here is my sceanario

var FlexWrap = React.createClass({  render:function(){    return(<View style={{flexDirection:'row'}}><Image source={{uri:profileImage}}             style={{width:100,height:100}}></Image><View style={{marginLeft:5}}><Text style={{marginTop:5,          marginBottom:5,          flexWrap:'wrap'}}>          This sample text          should be wrap          wrap wrap ....</Text><Text style={{marginTop:5,          marginBottom:5,          flexWrap:'wrap'}}>          This sample text          should be wrap          wrap wrap ....</Text></View></View>)  }})

Here

'This sample text should be wrap wrap wrap ....'

is in singleline, but in my scenario based on the window width automatically thetext should be wrap.Here i am using flexWrap: 'wrap' to wrap the text, but what is the correct way to wrap the text?

Please find the screenshot

enter image description here


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>