Android Question [SOLVED] CustomFonts Not Working For Me

mmieher

Active Member
Licensed User
Trying to use the Custom Fonts library, and must be missing something simple. The font is not changing on my label?

I did add Roboto-Regular.ttf to the files folder, as per the example project.

B4X:
Sub Globals
   
    Dim RobotoRegular As CustomFonts
    Dim Label1 As Label
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
   
    Activity.LoadLayout("Main")
    Label1.Text = "Roboto Regular?"
   
    RobotoRegular.Initialize("Roboto-Regular.ttf")
   
    RobotoRegular.SetCustomFontsToAllViews(Activity)    '    Does Not Change
    Label1.Typeface = RobotoRegular.SetCustomFonts        '    Does Not Change
End Sub
 

DonManfred

Expert
Licensed User
I did add Roboto-Regular.ttf to the files folder, as per the example project.
the file in files is LOWERCASED as in the example?
 
Upvote 0
Top