Android Question Icons

Ale_resource

Member
Licensed User
Hi, I need to use icons on some labels. I downloaded the fontawesome Ttf and copied it as an additional file in the project, then I wrote the following code to use the icon but a part of the word is also converted into an icon, why?
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    Dim myfont As Typeface = Typeface.LoadFromAssets("fontawesome5.ttf")
    Label1.Typeface = myfont
    Label1.Text = Chr(0xf4d3) & " SOSPENDI"
End Sub

This is the result:

 

Star-Dust

Expert
Licensed User
Longtime User
use CSBuilder
 
Upvote 0

Ale_resource

Member
Licensed User
use CSBuilder
I tried this but it's the exact same result
B4X:
    Activity.LoadLayout("Layout")
    Dim myfont As Typeface = Typeface.LoadFromAssets("fontawesome5.ttf")
    Label1.Typeface = myfont
    Dim cs As CSBuilder
    cs.Initialize
cs.Initialize.color(Colors.Blue).Size(28).Typeface(myfont).Append(Chr(0xf4d3)).Size(22).Append(" SOSPENDI").PopAll
    Label1.Text=cs
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…