React Native 中奇怪的调整大小模式

问题描述 投票:0回答:1

)我有一个关于React Native中图像奇怪缩放的问题,但是在React Native天才聊天组件包提供的组件中:MessageImage。 在 IOS 上一切看起来都很好,但在 Android 上.. 有人有想法吗?提前感谢您的帮助! :) 诗。我只想补充一点,封面在两个平台上看起来都不错。

 <MessageImage
                            {...props}
                            imageStyle={{
                                width: 148,
                                resizeMode: 'contain',
                                height: 150,
                            }}
                            containerStyle={{
                                backgroundColor: 'transparent',
                                borderColor: 'red',
                                borderWidth: 2,
                            }}
                        />
react-native image-resizing react-native-gifted-chat
1个回答
0
投票

更好地使用 resizeMode: 'cover',请参阅下面的小吃以了解更多信息: https://snack.expo.dev/@fukemy/image-resize-modes-example?platform=android

© www.soinside.com 2019 - 2024. All rights reserved.