【发布时间】:2019-03-01 04:59:36
【问题描述】:
我想在印刷机上放大图像。
这是我的代码
{
this.state.data.file_name &&
<Avatar
xlarge
source={{ uri: IMG_URL + this.state.data.file_name }}
onPress={() => this.enlargeImage(IMG_URL +
this.state.data.file_name)}
activeOpacity={0.7}
containerStyle={{ borderWidth: 1, borderColor: '#000', margin: 10 }}
/>
}
enlargeImage = (img) => {
return (
<Lightbox underlayColor="white">
<Image
style={{flex: 1,height: 200}}
resizeMode="contain"
source={{ uri: img }}
/>
</Lightbox>
)
}
现在点击图片没有反应。我正在使用react native lightbox。有没有其他方法可以在触摸时弹出图像?
【问题讨论】:
-
您在寻找图像查看器吗?
-
我只想在点击时放大图像以向用户显示完整图像。
标签: image react-native popup react-native-lightbox