Android Question [SOLVED]Display text from file into a label formatted as Fontawesome

AscySoft

Active Member
Licensed User
Longtime User
I have a simple text file with my app changes, and I want to load it and display it at app startup.
The output must be a label with typefece fontawesome (created with the designer).
The text from file is "bla bla...Chr(0xF0F9)... bla bla Chr(0xF0F8) "
How to correctly display it, not as a pure text with some strange simbols, but as a text with proper icons?
I manage to separate file into a list, then
Code: Copy
FontAwesomeLable.Text=list(0) & Chr(0xF0F9) & list(1) & Chr(0xF0F8)'etc
but it show an error (Exception) java.lang.Exception: java.lang.NumberFormatException: For input string: "0xF0F9",
 
You don't need to do anything special. Just put the characters directly in the text file and save it encoded with UTF8.

SS-2017-01-30_08.54.13.png


SS-2017-01-30_08.54.47.png


Code: Copy
Label1.Text = File.ReadString(File.DirAssets, "example.txt")

You can use the designer icon picker to copy the icons to the clipboard and then paste them in the text editor.
 

Attachments

Upvote 0
Just put the characters directly in the text file and save it encoded with UTF8.
This is the problem, becouse in my case even in unicode utf8, when I paste character selected, instead of a special character my computer insert only plain text like "Chr(0xF0F9)"
I download your file example.txt, opened it in notepad++, and paste this....is add only "Chr(0xF0F9)". I know this is silly. But I am stucked! Should I instal fontawesome in windows?
 
Upvote 0
Back
Top