When you use AddTextItem: the height depends on the text length. the item height adjusts to the full text by default. So in order to achieve a different height, you have to use clv1.ResizeItem
B4X:
Sub Button1_Click
Dim p As B4XView = clv1.GetPanel( clv1.Size -1)
Log(p.Height)
clv1.ResizeItem( clv1.Size -1, 30dip)
Dim l As B4XView=p.GetView(0)
l.Textsize=22
l.SetTextAlignment("TOP", "CENTER")
Log(l.Text)
Log(p.Height)
End Sub
Private Sub addTextItem( Text As String, Value As Object)
Dim pnl As B4XView = xui.CreatePanel( "")
pnl.SetLayoutAnimated( 0, 0, 0, clv.GetBase.Width, 30dip)
pnl.LoadLayout( "TextItem") 'a simple Label
Dim lbl As B4XView = pnl.GetView( 0)
lbl.Text = Text
clv.Add( pnl, Value)
End Sub
I would still be interested in whether there is also a solution with TextItem?