I have three lines of text for a label. For the 1 line i want to add a custom Typeface(first.ttf) and for the 2 and 3 line i want to keep it default. Is there any way i can do this?.
Have you looked at the RichString library. here is a small example that may put you in the right path, although if you load a font, I think it has to be applied to the entire label:
B4X:
Dim rs As RichString
Activity.AddView(Label2, 10dip, 70dip, 300dip, 300dip)
rs.Initialize("{R}{T}{Green}First line{Green}{T}{R}" & CRLF & "{U} Second line {U} " & CRLF & "{Red}{BI}Third line{Red}{BI}")
rs.Color2(Colors.Green,"{Green}")
rs.RelativeSize2(2, "{R}")
rs.Typeface2("monospace", "{T}")
rs.Underscore2("{U}")
rs.Color2(Colors.Red, "{Red}")
rs.Style2(rs.STYLE_BOLD_ITALIC, "{BI}")
Label2.Text = rs
Here is an example of a class (just the skeleton) that does it, by using 3 labels. You should add methods for properties that you want to change from the calling module, and put the rest of the prperties directly in the initialization sub of the class.