We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
按照文档中说的:
https://facebook.github.io/react-native/docs/image.html#content
我将图片放入app/src/main/res/mipmap-xxhdpi/splash_logo.png
在代码中使用:
'use strict'; var React = require('react-native'); var { View, StyleSheet, Text, Image, Dimensions } = React; var WINDOW_WIDTH = Dimensions.get('window').width; var StartScreen = React.createClass({ render: function() { return ( <View style={styles.container2}> <Image style={styles.imagetop} source={{uri:'http://img.qcds.com/ee978b96d3822476d4372dbe131d7f3a.jpg'}} /> <Image style={styles.imagedown} source={require("image!ic_launcher")} /> </View> ); } }); var styles = StyleSheet.create({ container2: { flex:1, flexDirection: 'column' }, imagetop: { flex: 3, width: WINDOW_WIDTH, }, imagedown: { flex:1, width: WINDOW_WIDTH, }, }); module.exports = StartScreen;
发现的问题就是本地的图片没有展示,但是网络加载的图片有展示
即imagedown没有显示出来。。。
我也按照文档的说明,重新在Android Sudio中rebuild这个项目了,然后重新Run项目了
不清楚还有哪里可能错了?
求助,能不能帮忙看下有可能我哪里还有设置错误?
The text was updated successfully, but these errors were encountered:
请把图片放到 drawable- 相关的文件夹中,不要放到mipmap- 中。
Sorry, something went wrong.
谢谢老大,是放错文件夹了
No branches or pull requests
按照文档中说的:
https://facebook.github.io/react-native/docs/image.html#content
我将图片放入app/src/main/res/mipmap-xxhdpi/splash_logo.png
在代码中使用:
发现的问题就是本地的图片没有展示,但是网络加载的图片有展示
即imagedown没有显示出来。。。
我也按照文档的说明,重新在Android Sudio中rebuild这个项目了,然后重新Run项目了
不清楚还有哪里可能错了?
求助,能不能帮忙看下有可能我哪里还有设置错误?
The text was updated successfully, but these errors were encountered: