Hi,
I am facing an issue with the horizontal custom list view. basically I am not able to resize the width at runtime. actually I can but when I add items, these are added up until the size the clv had before the runtime resize (i.e the designer size). the code below is quite simple and the intent is to resize at runtime the width of the clv and the clv gets actually resized but the items are visible only up to the orginal size and and the portion of width increased is left empty .Any idea?
I am facing an issue with the horizontal custom list view. basically I am not able to resize the width at runtime. actually I can but when I add items, these are added up until the size the clv had before the runtime resize (i.e the designer size). the code below is quite simple and the intent is to resize at runtime the width of the clv and the clv gets actually resized but the items are visible only up to the orginal size and and the portion of width increased is left empty .Any idea?
B4X:
ub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Log(CLVH.AsView.Width)
CLVH.AsView.Width = CLVH.AsView.Width * 1.5
Private ii As Int
For ii = 0 To 10
CLVH.Add(CreateItemH(CLVH.AsView.Height,"",ii,""),"")
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
xui.MsgboxAsync("Hello world!", "B4X")
End Sub
Private Sub CreateItemH(Height As Int, Title As String, Item As String, Content As String) As Panel
Dim p As B4XView = xui.CreatePanel("")
Dim Width As Int = Height *0.5
p.SetLayoutAnimated(0, 0, 0, Width, Height)
p.LoadLayout("LH")
Return p
End Sub