Nativescript Font Awesome in FormattedSring Button -
i want show font-awesome icons in nativescript application not showing everywhere.
<scrollview row="0" orientation="vertical" ios.pagingenabled="true"> <stacklayout #container verticalalignment="center"> <image src="res://logo_icon_white" stretch="none" horizontalalignment="center"></image> <label [text]="'welcome' | translate" class="welcome-text" horizontalalignment="center"></label> <label text=" " class="font-awesome" horizontalalignment="center"></label> <--- works! <button [text]="'login_with_paswword' | translate" (tap)="tapped()"></button> <button> <formattedstring> <span text=" " class="font-awesome"></span> <--- doesn't work! <span text=" " style="font-family: fontawesome;"></span> <--- doesn't work! <span [text]="'proceed_with_facebook' | translate" ></span> </formattedstring> </button> <button [text]="'create_an_account' | translate" class="account-button"></button> </stacklayout> </scrollview>
when use in label shows icon when want display in formattedstring/button (because use translation) doesn't show icon.
i hope can help?
the span
element not support styling through css. should use span's properties set styling. in case following should work:
<span text="" fontfamily="fontawesome"></span>
Comments
Post a Comment