Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30210

Width of buttons not changing in react native

$
0
0

I have two buttons in a row separated by the padding of 20 and they have occupied the width needed for the title of the button. Their width doesn't change!

Code for buttons

<View style={styles.buttonContainer}><View style={{ paddingLeft: 20 }}><Button title={tick} style={styles.button} onPress color="tomato" /></View><View style={{ paddingLeft: 20 }}><Button title="X" style={styles.button} onPress color="tomato" /></View></View>

CSS for buttons

buttonContainer: {    flex: 1,    flexDirection: 'row',    justifyContent: 'flex-end'},button: {    width: 50, // no matter what value I set here, their width doesn't changes    height: 20,},

Viewing all articles
Browse latest Browse all 30210

Trending Articles