iOS Question [Solved] Resize CustomListView with a one long panel

asales

Expert
Licensed User
Longtime User
This code from TILogistic works fine in B4A and B4J, but in B4i I get this behavior showed in the image.
The CLV with the long panel don't resize properly.

What could be?
How can I fixed?

1772844954755.png


B4X:
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0,0,0,clvTest.AsView.Width,clvTest.AsView.Height)

    p.LoadLayout("layout2")

    clvTest.Add(p,"")

    Sleep(0)

    clvTest.ResizeItem(0, panel1.Height)
 

asales

Expert
Licensed User
Longtime User
Solved!
The soluction to B4i is here:
"Make sure that the "handle resize event" option is unchecked in the item's layout file."
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Another trick would be to adjust it manually in B4i
B4X:
clvTest.ResizeItem(0, IIf(xui.IsB4i, panel1.Height + 20dip, panel1.Height))
 
Upvote 0
Top