#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private CustomListView1 As CustomListView
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
'xui.MsgboxAsync("Hello world!", "B4X")
For i = 0 To 10
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 100, 50dip)
Dim col As Panel
col.Initialize("col") ' if this event is defined, the ListView_ItemClick is not fired, if not defined it is
col.Color=Colors.Black
col.Tag=i
p.AddView(col,CustomListView1.AsView.Width-60dip, 0dip, 50dip, 50dip)
CustomListView1.Add(p, i)
Next
End Sub
Sub col_click
Log("Col fired") ' the question is: can we get the ListView row here
End Sub
Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Log(Value)
End Sub