Android Question MeasureStringWidth with csBuilder

fbritop

Active Member
Licensed User
Longtime User
Is there an alternative way to calculate the label width with different typeface?

B4X:
    cs.Initialize().Typeface(Typeface.FONTAWESOME).Size(Starter.subTitleSize).Color(color.appBlue).Append(Chr(0xF038)).PopAll
    cs.Typeface(fontNormal).Size(Starter.subtitleSize).Color(color.appBlue).Append("LOG").PopAll
    l3.Text=cs

l3.width=cv.MeasureStringWidth(cs, fontNormal, Starter.subTitleSize)

I have to go two times to actually get the FONTAWESOME and the fontNormal width´s in order to get the total width. With this method FONTAWESOME are not being considered.

Thanks
FBP
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…