iOS Question icon inside string does not show

ilan

Expert
Licensed User
Longtime User
hi

i noticed that in b4i (b4a works fine) if i put a fontawesome icon inside the string it does not show but outside it works.

this code gives me this output:

B4X:
Sub Button1_Click
    Label1.Text = "Congratulations, you won!  " & Chr(0xF091)
End Sub


IMG_6614.PNG


but this code does not show the icon:

B4X:
Private Sub Button2_Click
    Label1.Text = $"Congratulations, you won!  ${Chr(0xF091)}"$
End Sub

1724759175847.png


for some reason the icon code is shown and not the icon itself.
in b4a it works fine!
 

Attachments

  • strTest.zip
    110.7 KB · Views: 53

ilan

Expert
Licensed User
Longtime User
It is related to the way Chars are handled in B4i.

This should work:
B4X:
Label1.Text = $"Congratulations, you won!  ${"" & Chr(0xF091)}"$
ok thanks for the explanation.
but like this will it work on b4a too? if not i prefer this solution since it is for both platforms.

B4X:
Label1.Text = "Congratulations, you won!  " & Chr(0xF091)
 
Upvote 0
Top