I use this for load item:
... How can i resize PANEL and lblContent to fit text added when this is very long...?
... su is StringUtils
B4X:
Private Sub CreateItem (Width As Int,PubDate As String, Title As String, Content As String) As Panel
Dim p As B4XView = xui.CreatePanel("")
Dim height As Int = 280dip
If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 310dip
p.SetLayoutAnimated(0, 0, 0, Width, height)
p.LoadLayout("Card1")
lblPubDate.Text = PubDate
lblTitle.Text = Title
lblContent.Text = Content
Dim newHeight As Int
newHeight=su.MeasureMultilineTextHeight(lblContent, lblContent.Text)
'???? Resize Panel height and lblContent height
Return p
End Sub
... How can i resize PANEL and lblContent to fit text added when this is very long...?
... su is StringUtils