问题描述
我是本机反应的新手,我正面临响应图像的问题。该代码在我的手机上可以正常工作,但是当我在另一部手机上尝试使用时,图像会被割断。
我尝试了以下解决方案
Responsive image in React Native
React Native responsive image width while width/height ratio of image keeps the same
这是完整的代码https://snack.expo.io/SuHBzDnNi
return(
<SafeAreaView style={styles.container}>
<TouchableOpacity style={styles.Touch} onPress={this.MoveNextPage}>
<Image resizeMode="contain" source={require("../logo.png")} style={styles.logo}/>
</TouchableOpacity>
</SafeAreaView>
)
}
}
const styles = StyleSheet.create({
container:{
flex:1,height:Dev_Height,width:Dev_Width,justifyContent:"center",alignItems:"center",backgroundColor:"#121212"
},logo:{
height:"100%",width:"100%"
},Touch:{
justifyContent:"center",height:"22%",width:"40%"
}
})
谢谢:)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)