Hi,
I have a problem with the AHViewPager.
I have compiled a simple example of the problem.
I have a layout with 2 scrollviews residing on a panel.
I load page 0 and Page 1 with this layout.
I then load the scrollview panels as per code below.
Code
Sub Process_Globals
Dim TYPE_PAGE1 As Int : TYPE_PAGE1 = 1
Dim TYPE_PAGE2 As Int : TYPE_PAGE2 = 1
.....
in Sub Activity_Create
'Initialize the panels we use for the pages and put them in the container
container.Initialize
For i = 0 To 1
Dim pan As Panel
Select i
Case 0
pan = CreatePanel(TYPE_PAGE1, "Page 1")
container.AddPage(pan,"Page " & i)
Case 1
pan = CreatePanel(TYPE_PAGE2, "Page 2")
container.AddPage(pan,"Page " & i)
End Select
Next
'Now we have a container with our panels just add it to the pager object
pager.Initialize(container, "Pager")
......
'This creates a page of the given type
Sub CreatePanel(PanelType As Int, Title As String) As Panel
Dim pan As Panel
Dim pi As PanelInfo
pi.Initialize
pi.LayoutLoaded = False
pi.PanelType = PanelType
pan.Initialize("")
Select PanelType
Case TYPE_PAGE1
pan.LoadLayout("main8")
sv0.Panel.LoadLayout("f2panel")
sv0.Panel.Height = 100%y
sv1.Panel.LoadLayout("f0panel")
sv1.Panel.Height = 100%y
Case TYPE_PAGE2
pan.LoadLayout("main8")
sv0.Panel.LoadLayout("f2panel")
sv0.Panel.Height = 100%y
sv1.Panel.LoadLayout("f0panel")
sv1.Panel.Height = 100%y
End Select
pan.Tag = pi
Return pan
End Sub
Problem
If I am on Page 0 and I click a checkbox then the code in the CheckedChange event is executed but the changes do not happen.
If I am on page 1 and I do the same thing everything works perfectly.
I am attaching an example.
Any help would be greatly appreciated.
Thank you,
Tom
I have a problem with the AHViewPager.
I have compiled a simple example of the problem.
I have a layout with 2 scrollviews residing on a panel.
I load page 0 and Page 1 with this layout.
I then load the scrollview panels as per code below.
Code
Sub Process_Globals
Dim TYPE_PAGE1 As Int : TYPE_PAGE1 = 1
Dim TYPE_PAGE2 As Int : TYPE_PAGE2 = 1
.....
in Sub Activity_Create
'Initialize the panels we use for the pages and put them in the container
container.Initialize
For i = 0 To 1
Dim pan As Panel
Select i
Case 0
pan = CreatePanel(TYPE_PAGE1, "Page 1")
container.AddPage(pan,"Page " & i)
Case 1
pan = CreatePanel(TYPE_PAGE2, "Page 2")
container.AddPage(pan,"Page " & i)
End Select
Next
'Now we have a container with our panels just add it to the pager object
pager.Initialize(container, "Pager")
......
'This creates a page of the given type
Sub CreatePanel(PanelType As Int, Title As String) As Panel
Dim pan As Panel
Dim pi As PanelInfo
pi.Initialize
pi.LayoutLoaded = False
pi.PanelType = PanelType
pan.Initialize("")
Select PanelType
Case TYPE_PAGE1
pan.LoadLayout("main8")
sv0.Panel.LoadLayout("f2panel")
sv0.Panel.Height = 100%y
sv1.Panel.LoadLayout("f0panel")
sv1.Panel.Height = 100%y
Case TYPE_PAGE2
pan.LoadLayout("main8")
sv0.Panel.LoadLayout("f2panel")
sv0.Panel.Height = 100%y
sv1.Panel.LoadLayout("f0panel")
sv1.Panel.Height = 100%y
End Select
pan.Tag = pi
Return pan
End Sub
Problem
If I am on Page 0 and I click a checkbox then the code in the CheckedChange event is executed but the changes do not happen.
If I am on page 1 and I do the same thing everything works perfectly.
I am attaching an example.
Any help would be greatly appreciated.
Thank you,
Tom