Android Question [Solved] Using CSBuilder string with FontAwesome in a ScrollingLabel

asales

Expert
Licensed User
Longtime User
I try this code to put a random CSBuilder string with FontAwesome in a ScrollingLabel (XUI Views) , but the icon of FontAwesome is not showing:

font_awesome3.jpg


How I can fix it?

Thanks in advance for any tip.

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
 
   Dim cs As CSBuilder
   cs = SelectTip
   ScrollingLabel1.Text = cs
End Sub

Sub SelectTip As CSBuilder
   Dim lst As List
   lst.Initialize

   Dim cs As CSBuilder
   cs.Initialize.Append("Click in this icon: ").Typeface(Typeface.FONTAWESOME).Append(Chr(0xF055)).PopAll
   lst.Add(cs)
   cs.Initialize.Append("Click in this icon: ").Typeface(Typeface.FONTAWESOME).Append(Chr(0xF073)).PopAll
   lst.Add(cs)
   cs.Initialize.Append("Click in this icon: ").Typeface(Typeface.FONTAWESOME).Append(Chr(0xF030)).PopAll
   lst.Add(cs)
   cs.Initialize.Append("Click in this icon: ").Typeface(Typeface.FONTAWESOME).Append(Chr(0xF1B9)).PopAll
   lst.Add(cs)
 
   Dim nm As Int = Rnd(0,lst.Size)
 
   Return lst.Get(nm)
End Sub
 
Last edited:
Top