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

Flex row not working in React Native after reading all post here

$
0
0

I don't know what is wrong with my code, but always shows the < Text > under the < TouchableOpacity >. I tried to change everything in the code without results, nor about others similar troubles I tried to find here. FlexDirection: row doesn't work in any case. enter image description here:

const Task = (props) => {return (<View style={styles.item}><View styles={styles.itemLeft}><TouchableOpacity style={styles.square}></TouchableOpacity><Text style={styles.itemText}>{props.text}</Text></View><View style={styles.circular}></View></View>)}const styles = StyleSheet.create({item: {    backgroundColor: '#FFF',    padding: 15,    borderRadius: 10,    flexDirection: 'row',    alignItems: 'center',    justifyContent: 'space-between',    marginBottom: 20,},itemLeft: {    flexDirection: 'row',    alignItems: 'center',    // flexWrap: 'nowrap',},square: {    width: 24,    height: 24,    backgroundColor: '#FAA300',    opacity: 0.4,    borderRadius: 5,     marginRight: 15,},itemText: {    maxWidth: '80%',    // minWidth: '80%',},circular: {    width: 12,    height: 12,    borderColor: '#55BCF6',    borderWidth: 2,    borderRadius: 5,},})

Viewing all articles
Browse latest Browse all 1326

Trending Articles