Hi all.
I'm using B4xView TabStrip where I put 7 pages. Each page has a CLV.
Each CLV has a list of B4XSwitch - this is a schedule for each day of week.
So the Tabstrip has days of week like M T W and so on and each day of week has up to 3 B4XSwitch with labels- label shows start and finish hours.
Then I created a page in my code
Now I want to add B4XSwitches into each CLV on each page. Some kind of Russian doll.
My problem is here
How to fix it?
I'm using B4xView TabStrip where I put 7 pages. Each page has a CLV.
Each CLV has a list of B4XSwitch - this is a schedule for each day of week.
So the Tabstrip has days of week like M T W and so on and each day of week has up to 3 B4XSwitch with labels- label shows start and finish hours.
Then I created a page in my code
B4X:
Private Sub pgCase_Appear
Try
TabPages.Initialize
pgSun.Initialize("pgSun")
pgSun.RootPanel.LoadLayout("DayInfo")
pgSun.Title="S"
lblSunday.Text="Sunday"
TabPages.Add(pgSun)
pgMon.Initialize("pgMon")
pgMon.RootPanel.LoadLayout("DayInfo")
pgMon.Title="M"
lblMonday.Text="Monday"
TabPages.Add(pgMon)
pgTue.Initialize("pgTue")
pgTue.RootPanel.LoadLayout("DayInfo")
pgTue.Title="T"
lblDayName.Text="Tuesday"
TabPages.Add(pgTue)
''''''''''''' and so on
tsSchedule.SetPages(TabPages)
Catch
Log(LastException)
End Try
End Sub
Now I want to add B4XSwitches into each CLV on each page. Some kind of Russian doll.
My problem is here
B4X:
For p=0 to TabPages.size-1
dim CurrentPage as Page, clv as CustomListView
CurrentPage=TabPages.Get(p)
clv=pg.RootPanel.GetView(0) ' here is a problem - Types do not match
Next
How to fix it?