Hello,
this is a helper class to make it easier to create a tabstrip from the ASViewPager and ASTabMenu.
Important
You need ASTabMenu V1.13+
I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support me, then you can do it here by Paypal.
Features
Tutorial:
Author: Alexander Stolte
Version: 1.00
this is a helper class to make it easier to create a tabstrip from the ASViewPager and ASTabMenu.
Important
You need ASTabMenu V1.13+
I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support me, then you can do it here by Paypal.
Features
- All features of the ASTabMenu View
- All features of the ASViewPager View
- all events
- easy to use
Tutorial:
- Step 1
- Step 2
- Initialize the ASTabStrip class
ASTabStrip1.Initialize(ASTabMenu1,ASViewPager1)
- Initialize the ASTabStrip class
- Step 3
- Add Pages
-
ASTabStrip add pages:
For i = 0 To 5 Dim tmp_xpnl As B4XView = xui.CreatePanel("") tmp_xpnl.Color = xui.Color_ARGB(255,Rnd(1,255),Rnd(1,255),Rnd(1,255)) tmp_xpnl.SetLayoutAnimated(0,0,0,ASViewPager1.CustomListView.GetBase.Width,ASViewPager1.CustomListView.GetBase.Height) ASTabStrip1.AddPage(xui.Color_ARGB(255,39, 174, 97),"Tab " & i,ASTabMenu1.FontToBitmap(Chr(0xF015),False,30,xui.Color_White),"",tmp_xpnl,"") Next
-
- Add Pages
- Step 4
- Add the ASViewPager PageChanged event
- Add the ASTabMenu TabClick event
-
B4X:
Sub ASViewPager1_PageChanged(Index As Int) ASTabStrip1.ViewPager_PageChanged(Index) End Sub Sub ASTabMenu1_TabClick(index As Int) ASTabStrip1.TabMenu_TabClick(index) End Sub
- Done
Author: Alexander Stolte
Version: 1.00
- ASTabStrip
- Functions:
- 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) As String
- Initialize (TabMenu As com.as.tabstrip.astabmenu, ViewPager As com.as.tabstrip.asviewpager) As String
Initializes the object. You can add parameters to this method if needed. - IsInitialized As Boolean
Tests whether the object has been initialized. - RemovePage (index As Int) As String
- TabMenu_TabClick (index As Int) As String
- ViewPager_PageChanged (index As Int) As String
- Functions:
- V1.0
- Release
Attachments
Last edited: