Font awesome icon not showing up in Xamarin.Forms

匿名 (未验证) 提交于 2019-12-03 01:41:02

问题:

Font awesome icons are not working for me in Xamarin.Forms. This is my Label xaml

<Label TextColor="Red" FontFamily="FontAwesomeBrands"  FontSize="Large" Text="&#xf122;" RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width,Factor=1}"> </Label>

I have added these file in Assests folder of android project

Output just showing empty symbol. how can I make it work?

回答1:

Have you created platform-specific CustomRenderers for that?

Please, look at my answer, and follow the tutorial. Link to answer

Hope this helps!



回答2:

I use Xam.FormsPlugin.Iconize and Xam.Plugin.Iconize NuGet packages for icons:

xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"   <iconize:IconLabel Text="fa-question-circle" FontSize="Medium" TextColor="#666666" HorizontalTextAlignment="End"/>


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!