image - 如何在本机反应中在平面列表上显示图像
问题描述
我正在用 react native 构建一个应用程序。我想在一个平面框中显示一些图像。如何在 react native 的平面列表上显示图像 这是我的代码
解决方案
来自 React Native文档:
请注意,对于网络和数据图像,您需要手动指定图像的尺寸!
像这样:
<Image
style={{width: 50, height: 50}}
source={{uri: 'http://sslweb.solidstatelogic.com.s3.amazonaws.com/user-icon.png'}}
/>
推荐阅读
- javascript - 使用 react-router 自定义动态路由
- excel - 使用带有 BeforeClose 的 msgbox 将数据导出到另一个工作簿
- search - Google Places API 可以进行模糊搜索吗
- python - 调用命令然后写入同一个子进程
- excel - 如何解决 VBA 中工作簿之间的复制和粘贴问题?
- ios - Apple 是否允许从 Web 应用程序购买内容?
- selenium - 如何在文本框中为 Selenium 中的蛋 99 发送两次号码
- r - 在R中的轴上添加一条独立于y的线
- javascript - 是否有 JS 函数或方法以 4 位格式返回数字?
- android - 即使一个 Observable 发出 onError 也将两个 observable 合并为 List 并返回值