我使用普通图像标签来显示服务器图像,但有些图像显示正确,有些则没有。
- 我正在将 react-native 用于 android 应用程序
- 我使用 react-native-responsive-dimensions 来调整相对于屏幕大小的图像大小。
- 通过状态传递图像 URL。
<View>
<Image
style={{borderWidth:1,
width: responsiveWidth(100),
height: responsiveHeight(50),
resizeMode:'contain'}}
source = {{ uri:this.state.productimage}}/>
</View>