Hello,
I need to add a horizontal CustomListView as an element of a Vertical CLV. The code that I'm using is:
But when I try to the individual rows in the horizontal CLV I'm getting the error:
It isn't possible to load an horizontal CLV as an item inside a vertical CLV? What's the correct method?
Thanks!
PS: the parent CLV is being loaded in the root panel, in the first layout... the second is loaded in the item layout of the first (CLVOfertas in layout restaurantMenuOfertas, item 0)
I need to add a horizontal CustomListView as an element of a Vertical CLV. The code that I'm using is:
B4X:
Private Sub createOfertas As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0,0,0,100%x,200dip)
p.LoadLayout("restaurantMenuOfertas")
Dim clvOfertas As CustomListView = p.GetView(0)
Dim query As String = "select * from cadProd where idRest = " & idRest & " and unitOriginalPrice > 0 and unitPrice > 0 order by (unitPrice - UnitOriginalPrice) asc limit 4"
Dim cursor1 As ResultSet
cursor1 = B4XPages.MainPage.sql1.ExecQuery(query)
Do While cursor1.NextRow
clvOfertas.Add(createOfertasItens,"ofertas")
Loop
cursor1.Close
Return p
End Sub
Private Sub createOfertasItens As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0,0,0,100%x,200dip)
p.LoadLayout("restaurantMenuOfertaItem")
p.Width = 80dip
p.Height = 200dip
Return p <---- Error here
End Sub
But when I try to the individual rows in the horizontal CLV I'm getting the error:
B4X:
Method not found: _add::, target: <B4IPanelView: 0x103b1b3d0; frame = (0 0; 375 181.973); clipsToBounds = YES; animations = { bounds.origin=<CASpringAnimation: 0x282c22480>; bounds.size=<CASpringAnimation: 0x282c22440>; position=<CASpringAnimation: 0x282c22380>; }; layer = <CALayer: 0x282c22360>>
It isn't possible to load an horizontal CLV as an item inside a vertical CLV? What's the correct method?
Thanks!
PS: the parent CLV is being loaded in the root panel, in the first layout... the second is loaded in the item layout of the first (CLVOfertas in layout restaurantMenuOfertas, item 0)