hi.
i am using this code. everything works fine but long texts are not visible in the panel.
what should I do. thanks
B4X:
...........
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, CLV1.AsView.Width, 280dip)
CLV1.Add(p, cd)
........
Sub CLV1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
Dim ExtraSize As Int = 10
For i = Max(0, FirstIndex - ExtraSize) To Min(LastIndex + ExtraSize, CLV1.Size - 1)
Dim p As B4XView = CLV1.GetPanel(i)
If p.NumberOfViews = 0 Then
Dim cd As CardData = CLV1.GetValue(i)
'**************** this code is similar to the code in CreateItem from the original example
p.LoadLayout("Card11")
lblTitle.Text = cd.Title
' lblContent.Text = cd.Content
' Log(cd.content)
Label1.Text=cd.date
Dim htm As Html
Dim su As StringUtils
lblContent.Text = htm.FromHtml(cd.Content)
lblContent.Height=su.MeasureMultilineTextHeight(lblContent,lblContent.Text)
ContentHolderPanel.Height=lblContent.Top+lblContent.Height+5dip
End If
Next
End Sub
i am using this code. everything works fine but long texts are not visible in the panel.
what should I do. thanks
Attachments
Last edited: