Private Sub Class_Globals
Private gTabMenu As ASTabMenu
Private gViewPager As ASViewPager
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(TabMenu2 As ASTabMenu,ViewPager2 As ASViewPager)
gTabMenu = TabMenu2
gViewPager = ViewPager2
End Sub
Public Sub AddPage(tab_background_color As Int,tab_text As String,tab_icon As B4XBitmap,tab_tag As Object,pager_layout As B4XView,pager_value As Object)
gTabMenu.AddTab(tab_background_color,tab_text,tab_icon,tab_tag)
gViewPager.AddPage(pager_layout,pager_value)
End Sub
Public Sub RemovePage(index As Int)
gTabMenu.RemoveAt(index)
gViewPager.RemovePage(index)
End Sub
Public Sub ViewPager_PageChanged(index As Int)
gTabMenu.SetTab(index,False,False)
End Sub
Public Sub TabMenu_TabClick(index As Int)
gViewPager.CurrentIndex = index
End Sub
Public Sub getViewPager As ASViewPager
Return gViewPager
End Sub
Public Sub getTabMenu As ASTabMenu
Return gTabMenu
End Sub