Dim Alto, AltoPanel As Int
Dim Su As StringUtils
Dim T0,T As String
T0="Ejemplo de texto que crece. "
T=T0
CLV.Clear
For i=1 To 10
Dim P As B4XView=xui.CreatePanel("")
p.SetLayoutAnimated( 0, 0, 0, CLV.AsView.Width, 50dip )
P.LoadLayout("lyElemento")
Dim Lbl1 As B4XView=P.GetView(0)
Lbl1.Text="Elemento " & i
Dim lbl2 As B4XView=P.GetView(1)
lbl2.Text=T
T=t & T0
Alto=Su.MeasureMultilineTextHeight(lbl2,lbl2.Text)
lbl2.Height=Alto
AltoPanel=lbl2.Top+Alto+2dip
p.SetLayoutAnimated( 0, 0, 0, CLV.AsView.Width, AltoPanel )
CLV.Add(P,CLV.Size)
Next