xaml - 字体真棒图标未显示在 Xamarin.Forms
问题描述
在 Xamarin.Forms 中,字体真棒图标不适合我。这是我的Label
xml
<Label TextColor="Red" FontFamily="FontAwesomeBrands" FontSize="Large" Text=""
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,
Property=Width,Factor=1}">
</Label>
我已将这些文件添加Assests
到 android 项目的文件夹中
输出只显示空符号。我怎样才能让它工作?
解决方案
我使用 Xam.FormsPlugin.Iconize 和 Xam.Plugin.Iconize NuGet 包作为图标:
xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"
<iconize:IconLabel Text="fa-question-circle" FontSize="Medium" TextColor="#666666" HorizontalTextAlignment="End"/>
推荐阅读
- javascript - 在 React 中提交表单后如何重定向到新路由
- python - 提取所有
来自带有 BeautifulSoup 的 HTML
- javascript - 在 Javascript 中编辑对象(从数组中删除符号)
- django - “CountryPDF”对象没有属性“数据”
- function - 智能合约更新功能
- c - 我写了一个程序,当输入'n'或'N'时应该终止但它不起作用
- c# - 如何同时构建 x64 和 x86 可执行文件
- ios - 打开带有 UIDocumentInteractionController URL 错误的 PDF
- android - 是否可以在没有用户交互的情况下切换钱包中的支付卡?
- image-recognition - 是否可以限制 Google AutoML 图像增强?