)我有一个关于React Native中图像奇怪缩放的问题,但是在React Native天才聊天组件包提供的组件中:MessageImage。 在 IOS 上一切看起来都很好,但在 Android 上.. 有人有想法吗?提前感谢您的帮助! :) 诗。我只想补充一点,封面在两个平台上看起来都不错。
<MessageImage
{...props}
imageStyle={{
width: 148,
resizeMode: 'contain',
height: 150,
}}
containerStyle={{
backgroundColor: 'transparent',
borderColor: 'red',
borderWidth: 2,
}}
/>
更好地使用 resizeMode: 'cover',请参阅下面的小吃以了解更多信息: https://snack.expo.dev/@fukemy/image-resize-modes-example?platform=android