Android Question the height of the customlistview

franciscoluiz

Member
Licensed User
Longtime User
You can change the height of an item of listview custom, after he has already been created/populated?


i tested this:


Private p As Panel
p.Initialize("p")
CustomListView1.Add(p,14%y,"A")
p.LoadLayout("editorTextoNumero")
...
...
Dim panelA As Panel = CustomListView1.GetPanel(CustomListView1.GetItemFromView(p))
panelA.Height=460dip 'NOT WORK

i want to customize the height individually, for some items. it is possible?

thank you
 

mangojack

Expert
Licensed User
Longtime User
You can change the height of an item of listview custom, after he has already been created/populated?

You can't change the panel / item height on the fly ...

What you can do is Get the panel in question , remove it from CLV then re-insert it with the new height using CLV.InsertAt ...

something like ..
B4X:
clv.RemoveAt(index)
  
    Dim p As Panel
    p.Initialize("")
    p.LoadLayout("CellItem")
    Label1.Text = "new height is 200 dip"

    clv.InsertAt(index, p, 200dip, "A")
 
Last edited:
Upvote 0
Top