I have the folowing error:
java.lang.RuntimeException: Object should first be initialized (Typeface).
But typeface does not have an init method. What is the correct way?
Starter Service
Main.bas
java.lang.RuntimeException: Object should first be initialized (Typeface).
But typeface does not have an init method. What is the correct way?
Starter Service
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Public bigSize As Int=(19)
Public superBigSize As Int=(24)
Public titleSize As Int=(16)
Public subTitleSize As Int=(14)
Public smallSize As Int=(11)
Public badgeSize As Int=(10)
Public fontNormal, fontBold, fontBold2, fontMedium As Typeface
End Sub
Sub Service_Create
fontNormal.LoadFromAssets("RobotoLight.ttf")
fontBold.LoadFromAssets("RobotoRegular.ttf")
fontBold2.LoadFromAssets("RobotoBlack.ttf")
fontMedium.LoadFromAssets("RobotoMedium.ttf")
End Sub
B4X:
Log(fontBold)
cs.Initialize().Size(Starter.bigSize).Typeface(Typeface.MATERIALICONS).RelativeSize(0.8).Append(Chr(0xE551)).PopAll
cs.Size(Starter.bigSize).Typeface(Starter.fontBold).Append(" " & x.formatMobileNumberLong(Starter.kvs2.Get("movil"))).PopAll
ActionBar.Title=cs