ub Process_Globals
Private xui As XUI
End Sub
Sub Globals
Private CLV As CustomListView
Private Swipe As CLVSwipe
Private VP As AHViewPager
Private PC As AHPageContainer
Private Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
'Initialize CLVSwipe
Swipe.Initialize(CLV, Me, "Swipe")
Dim PullToRefreshPanel As B4XView = xui.CreatePanel("")
PullToRefreshPanel.SetLayoutAnimated(0, 0, 0, 100%x, 70dip)
PullToRefreshPanel.LoadLayout("PullToRefresh")
Swipe.PullToRefreshPanel = PullToRefreshPanel
'Comment this code to make panelx sliding work!
'Add the Panel to CLV
Panel1.RemoveView
CLV.Add(Panel1, "")
'Add some Panels to AHViewPager
PC.Initialize
Dim panelx(3) As Panel
panelx(0).Initialize("")
panelx(1).Initialize("")
panelx(2).Initialize("")
panelx(0).Color = Colors.Green
panelx(1).Color = Colors.White
panelx(2).Color = Colors.Red
PC.AddPage(panelx(0), "Green")
PC.AddPage(panelx(1), "White")
PC.AddPage(panelx(2), "Red")
VP.PageContainer = PC
'Try to slide, it will not work
'If you don't initialize CLVSwipe, works!
End Sub