I'm using a customlistview to display formatted text using clv.AddTextItem I use clv.getPanel to set the background to white. The problem is that that the text is too close to the edges. Does anyone known a simple way to add some more padding to this text I can add space to the top and...
www.b4x.com
The key is the MeasureMultiTextHeight function
B4X:
Public Sub MeasureMultiTextHeight(lbl As Label, width As Int, text As Object) As Int
#if b4a
Private su As StringUtils
Return su.MeasureMultilineTextHeight(lbl, text)
#else if b4i
Dim plbl As Label
plbl.Initialize("")
plbl.Width = width
plbl.Multiline = True
XUIViewsUtils.SetTextOrCSBuilderToLabel(plbl,text)
plbl.SizeToFit
Return plbl.Height
#End If
End Sub