2つの同様のコンポーネントがレンダリングされました。各コンポーネントにはアイコンとテキストがあり、それぞれが重なってはいけません。私のスタイリングに何が問題なの?ここでこれらの反応成分が重なっているのはなぜですか?
import Icon from "react-native-elements/src/icons/Icon";
<TouchableOpacity onPress={_ => playSound(audio)} style={{
flexDirection: 'row',
flexGrow:1,
flex: 1
}}>
<View>
<Icon name="volume-up" color={PRIMARY_BG} size={24}/>
</View>
<View>
<Text style={{
flexGrow: 1,
fontSize: 8,
backgroundColor: GRAY
}}>
[{locale}]{this.props.pronunciation[locale][0]}
</Text>
</View>
</TouchableOpacity>
は出力です:
親コンテナスタイル
headItemContent: {
flex: 3,
flexDirection: 'row',
justifyContent: 'space-between'
},
私はそれがこれらの2つの親指のスタイルだと思う 。私は彼らがうまく見えるミニプロジェクトを作った。 –
Val
親のスタイルを更新しました。それはまた大丈夫でしょう – newBike
イメージはあったのですか?テキストの下に? – ShaneG