Android Question Label text misbehave

sanduro

Member
Licensed User
Longtime User
What i do wrong, I have a panel, panel is filled with label and when i try to set text to label it is not centered , it is way down and if i make it big enough it disspeaapers from screen

<code>
Sub drawDatum(P As Panel)
Dim dat As Label
Dim LabelFace As Typeface
LabelFace = Typeface.LoadFromAssets("cambria.ttc")


dat.Initialize("e_datum")
dat.Typeface = LabelFace
dat.Text = "15:08"
dat.Color = Colors.Magenta
dat.TextColor = ColorBlack
dat.textSize = 45

dat.Gravity = Bit.OR(Gravity.CENTER_VERTICAL, Gravity.CENTER_HORIZONTAL)
P.AddView(dat,0,0,P.Width,P.Height)
End Sub
</code>
 

sanduro

Member
Licensed User
Longtime User
Thank you it was not the problem,it is weird but when I did change font from cambria.ttc to impact.ttf everything works, any idea why so ?

As I have found on web Java doesnt support ttc correctly

San
 
Last edited:
Upvote 0
Top