android - XAML 图像源在跨平台(Android 模拟器)中不起作用
问题描述
我正在尝试设计一个类似于 Instagram 的 UI(这是一个练习),并且无法从 URL 显示图像。似乎代码是正确的,但它不起作用。
<StackLayout>
<Label TextColor="Black" Text="nyc_photographer"/>
</StackLayout>
<!--Image not showing-->
<Image Source="http://lorempixel.com/1920/1080/nature/3/"/>
<StackLayout Orientation="Horizontal" Spacing="20">
<Button TextColor="Blue" Text="Like" BackgroundColor="Transparent" />
<Button TextColor="Blue" Text="Comment" BackgroundColor="Transparent"/>
<Button TextColor="Blue" Text="Share" BackgroundColor="Transparent"/>
</StackLayout>
<StackLayout>
<BoxView Color="#f0f0f0" HeightRequest="1" />
<Label Text="700 likes" FontAttributes="Bold" TextColor="Black"/>
<Label TextColor="#444" Text="This is a shot yesterday in Skanor, Sweden, when driving home, from a couple of days of work in Denmark." />
</StackLayout>
</StackLayout>
在昵称 nyc_photographer 和 Like 按钮后应该出现图像。我展示了预期结果应该如何的图像。
解决方案
推荐阅读
- ember.js - “不等于当前路线”的 Ember 计算属性
- python - 带有两个词标记的文本分类
- .net - 如何将 Redis 集群与 StackExchange.Redis 一起使用?
- javascript - 我如何在这个函数中解析这两个字符串以便在我的位置={}中使用,我需要整数
- apache-kafka - Kafka 连接转换 (SMT) - 帮助解决用例
- java - Java 按字母顺序对 ArrayList 中的 ArrayList 进行排序
- javascript - 从原始日期计算工作日
- android - mapView 在 android 中无法正确显示
- database - MongoDB:在文档中移动元素
- ios - Firemonkey iOS CFBundleExecutable错误部署应用程序