Код выше приведен на рисунке ниже. Я хочу убрать дополнительный серый цвет небольшого заднего фона. Как вы можете видеть на картинке, между answerContainer & answerCard1Container возникает небольшой разрыв. Хотите зафиксировать высоту субконтейнера, когда высота динамически изменяется в основном контейнере, удалив разрыв серого цвета.
<View style={styles.answerContainer}>
<View style={styles.answerCard1} />
<View style={styles.answerCard2}>
<View style={styles.answerMainView}>
<Text style={styles.msgAnswerText}>{this.props.chatItem.question}</Text>
</View>
</View>
<View style={styles.answerCard3} />
</View>
answerContainer: {
flex: 1,
backgroundColor: Colors.chatSelectedAnswerColor,
height: 'auto',
minWidth: (Dimensions.get('window').width) / 3.2,
maxWidth: (Dimensions.get('window').width) - 55,
marginRight: 18,
marginTop: 15,
minHeight: 50,
alignSelf: 'flex-end',
},
answerCard1: {
flex: 1,
backgroundColor: Colors.appBackgroundColor,
borderBottomRightRadius: 100,
height: 20
},
answerCard2: {
flex: 2,
backgroundColor: Colors.appBackgroundColor,
},
answerMainView: {
flex: 1,
backgroundColor: Colors.chatSelectedAnswerColor,
borderBottomRightRadius: 80,
borderBottomLeftRadius: 80,
borderTopLeftRadius: 80,
},
answerCard3: {
flex: 1,
backgroundColor: Colors.appBackgroundColor,
borderTopLeftRadius: 80
}
});
пример изображения