Hello,
I have a customlist view, containing my cellitems which are label and webview. And on top of that I have a panel containing image slider. I can scroll on my customlistview just fine. Now I have to create all these items scrolable. So my panel with image slider and my customlistview.
Bellow is my code for cellItem
and for my slider in activity_create
What will be the best way to achieve that?
Regads!
I have a customlist view, containing my cellitems which are label and webview. And on top of that I have a panel containing image slider. I can scroll on my customlistview just fine. Now I have to create all these items scrolable. So my panel with image slider and my customlistview.
Bellow is my code for cellItem
B4X:
Sub CreateListItem(Text As String, Url As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
'we need to add the panel to a parent to set its dimensions. It will be removed after the layout is loaded.
Activity.AddView(p, 0, 0, Width, Height)
p.LoadLayout("CellItem")
p.RemoveView
WebView1.LoadHtml("<html><body><img src='"&Url&"'></body</html>")
'Button1.Text = "Click"
Label1.Text = Text
Return p
End Sub
Sub clv2_AddItems
Panel1.Visible=True
''Log("AddItems")
Dim currentNumberOfItems As Int = clv2.GetSize
Dim job As HttpJob
job.Initialize("getjson", Me)
Starter.csu.CallSubPlus("Main", job.Download("Url") , 3000)
End Sub
and for my slider in activity_create
B4X:
Panel2.AddView(Slider,0dip,0dip,100%x,30%y)
What will be the best way to achieve that?
Regads!