'Code module
#Region Project Attributes
#ApplicationLabel: B4i Example
#Version: 1.0.0
'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
#iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
#iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
#Target: iPhone, iPad
#ATSEnabled: True
#MinVersion: 8
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private xui As XUI
Private lblforSB4 As Label
Private SB4 As B4XSeekBar
Private clv As CustomListView
Private lblTitle4 As Label
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Page1")
NavControl.ShowPage(Page1)
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
For i=1 To 10
clv.Add(CreateForm4("Card "&i),"")
Next
End Sub
Sub CreateForm4(Text As String) As Panel
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, clv.AsView.Width, Page1.RootPanel.Height*0.35)
p.LoadLayout("Page2")
lblTitle4.Text=Text
SB4.Tag=SB4
SB4.Value=50
RemoveClickRecognizer(p)
Return p
End Sub
Private Sub RemoveClickRecognizer (pnl As B4XView)
Dim no As NativeObject = pnl.Parent
Dim recs As List = no.GetField("gestureRecognizers")
For Each rec As Object In recs
no.RunMethod("removeGestureRecognizer:", Array(rec))
Next
End Sub