Android Question other

adastra

Member
Licensed User
Longtime User
when i use other font as typeface and apply that font to label then label line spacing got increase. do't no why. please help

Sub Globals
Dim Myfont As Typeface
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("LayTest")
Activity.Color=Colors.ARGB(255,55,85,123)
Myfont=Typeface.LoadFromAssets("shruti.TTF")
Dim LblTitleName As Label
LblTitleName.Initialize("LblTitleName")
LblTitleName.Typeface=Myfont
LblTitleName.Text="Title" & CRLF & "Ram Kumar Sharma" & CRLF & "14/21, Malviya Nagar"
LblTitleName.TextColor=Colors.Black
LblTitleName.Gravity=Gravity.LEFT
Activity.AddView(LblTitleName,2%x,10%y,80%x,25%y)
End Sub
 

adastra

Member
Licensed User
Longtime User
ok.
default fonts is working fine but when use some other fonts and try to use crlf for line break it takes double line break, don't know why.
so the problem is in font? or i have to write some code
 
Upvote 0
Top