I applied a border to a 'View' and I want to know how can I change the opacity of the border.
<View style={styles.mainContainer}> </View>
mainContainer: {
borderWidth: 2,
borderColor: '#ddd',
....
opacity: 2,
....
}
It is not working when I applied the style as above.
Do try using borderColor: 'rgba(158, 150, 150, .5)'
where the last parameter defines opacity and it ranges from 0 to 1