Android Question Set FontAwesome & Material Icons TypeFace in code

klaus

Expert
Licensed User
What is the best method to set the FontAwesome & Material Icons TypeFaces to a view added in the code?
Currently I added the MaterialIcons.ttf file to the Assets folder and created a new TypeFace:
B4X:
Private MyTypeface as Typeface
MyTypeface = Typeface.LoadFromAssets("B4X_MaterialIcons.ttf")
Label1.Text = Chr(0xE149)
 

klaus

Expert
Licensed User
Erel, will there be a more 'direct' method in the future?
Because I am using it in a CustomView class.
Adding the it in the Designer no problem.
But I want the user also be able to add in the code.
Therefore I need to add the hidden Label and set the Typeface as a property.
 
Last edited:
Top