PageViewController is a pages controller (similar to NavigationController and TabBarController) that allows the user to switch pages with a swipe gesture. It is similar to B4A ViewPager.
Using PageViewController is simple. You initialize the controller with the list or array of pages.
The next step is to set it as the key controller:
Video example:
The example project is attached.
Note that there is no navigation bar. The title is made of a label.
Using PageViewController is simple. You initialize the controller with the list or array of pages.
The next step is to set it as the key controller:
B4X:
Private Sub Application_Start (Nav As NavigationController)
Page1.Initialize("Page1")
Page1.RootPanel.LoadLayout("Layout1")
Page2.Initialize("Page2")
Page2.RootPanel.LoadLayout("Layout2")
Page3.Initialize("Page3")
Page3.RootPanel.LoadLayout("Layout3")
PVC.Initialize("pvc", Array(Page1, Page2, Page3))
App.KeyController = PVC
End Sub
Video example:
The example project is attached.
Note that there is no navigation bar. The title is made of a label.