这是最简单的代码: export default class App extends React.Component { render() { return ( View style={styles.container} Image resizeMode={'contain'} source={imageSource}/ /View ) }}const styles = StyleSheet.create({ container: { fl
export default class App extends React.Component { render() { return ( <View style={styles.container}> <Image resizeMode={'contain'} source={imageSource}/> </View> ) } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, })
如果resizeMode设置在’center’上,它的工作方式几乎与预期一致,但在’contains’时,图像不会调整大小. The image is really huge,但它没有调整大小……我哪里错了?