RUdolf Lam
Member
Hello. When I try to adjust the height of a label view containing Chinese words, sometimes the height cannot be adjusted correctly. Is it my coding error or intrinsic problem? Thank you
B4X:
Sub Globals
Dim Lb1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim su As StringUtils
Lb1.Initialize("")
Lb1.Gravity=Bit.Or(Gravity.TOP,Gravity.CENTER_HORIZONTAL)
Lb1.TextSize=20:Lb1.textcolor=Colors.black:Lb1.color=Colors.yellow
Lb1.Text="東南西北" &CRLF&CRLF& "東南西北" &CRLF&CRLF& "東南西北"
Activity.AddView(Lb1,0,0,Activity.Width,0)
Lb1.Height=su.MeasureMultilineTextHeight(Lb1,Lb1.Text)
End Sub