-1
Skalieren Sie Bild wie wir es in HTML tun. img {height:100%; width:100%}
in reagieren nativ.Bild in React Native skalieren
Ich habe versucht resizeMode?: enum('cover', 'contain', 'stretch', 'repeat', 'center')
aber keiner von ihnen funktioniert in meinem Fall.
<View style={{
flex: 1,
alignItems: 'center',
justifyContent: 'center',
paddingTop: Constants.statusBarHeight,
backgroundColor: '#ecf0f1',
flexDirection:'row'
}}>
<View style={{flex:1, backgroundColor:'yellow'}}>
<Image
style={{width: 50, height: 50}}
resizeMode="stretch"
source={{uri: 'http://aristotlebuzz.com/wp-content/uploads/2017/01/Facebook.png'}}
/>
</View>
<View style={{flex:1, backgroundColor:"red"}}>
<Text>afdafda</Text>
</View>
</View>
https://snack.expo.io/ByhjFQo1M
Werfen Sie einen Blick auf [reagieren-native-skalierbare-Bild] (https://www.npmjs.com/package/react- natives skalierbares Bild) –