The last custom view, for this year,
a month ago, I felt like creating this view, but had been reluctant to publish it because there is still too little space used for the tabs.
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.
It use multi line, if required.
But if you are using 3 tabs, then it fits perfect
Looks better than on the gif
ASFlowTabMenu
Author: Alexander Stolte
Version: 1.00
a month ago, I felt like creating this view, but had been reluctant to publish it because there is still too little space used for the tabs.
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.
It use multi line, if required.
But if you are using 3 tabs, then it fits perfect
Looks better than on the gif
Add Tabs:
ASFlowTabMenu1.AddTab(ASFlowTabMenu1.FontToBitmap(Chr(0xF015),False,20,xui.Color_White),"Home")
ASFlowTabMenu1.AddTab(ASFlowTabMenu1.FontToBitmap(Chr(0xE7F4),True,20,xui.Color_White),"Notifications")
ASFlowTabMenu1.AddTab(ASFlowTabMenu1.FontToBitmap(Chr(0xE8B8),True,20,xui.Color_White),"Settings")
'ASFlowTabMenu1.AddTab(ASFlowTabMenu1.FontToBitmap(Chr(0xF015),False,20,xui.Color_White),"Test 4")
Author: Alexander Stolte
Version: 1.00
- ASFlowTabMenu
- Events:
- TabClick (index As Int)
- Fields:
- mBase As B4XView
- Tag As Object
- Functions:
- AddTab (Icon As B4XBitmap, Text As String) As String
Add a new tab - Class_Globals As String
- CreateASFlowTabMenu_Tab (Index As Int, Icon As B4XBitmap, Text As String, TextColor As Int, xFont As B4XFont) As ASFlowTabMenu_Tab
- DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
Base type must be Object - FontToBitmap (text As String, IsMaterialIcons As Boolean, FontSize As Float, color As Int) As B4XBitmap
FontAwesome To Bitmap
Unlike an older "TextToBitmap" sub that you can find in the forum, this code vertically centers the icon. It can also be used in B4J and B4i (only need to change the font line). Sub Activity_Create(FirstTime As Boolean) 'usage example Activity.AddMenuItem3("Android", "Test"...www.b4x.com - getCurrentIndex As Int
Gets or sets the current index
Sets the current index without animation - getGlobalTabProperties As ASFlowTabMenu_Tab
Change this properties before you add tabs - getIconHeight As Float
Gets or sets the icon Width and Height - getSize As Int
- GetTabPropertiesAt (Index As Int) As ASFlowTabMenu_Tab
- Initialize (Callback As Object, EventName As String) As String
- IsInitialized As Boolean
Tests whether the object has been initialized. - RefreshTabProperties As String
If you change Tab Properties then call this function to apply this - RemoveTab (Index As Int) As String
Removes a tab from a certain index - setCurrentIndex (Index As Int) As String
- setCurrentIndexAnimated (Index As Int) As String
Sets the current index with animation - setIconHeight (Height As Float) As String
Gets or sets the icon Width and Height - SetTabProperties (Index As Int, TabProperties As ASFlowTabMenu_Tab) As String
Call RefreshTabProperties after this
- AddTab (Icon As B4XBitmap, Text As String) As String
- Properties:
- CurrentIndex As Int
Gets or sets the current index
Sets the current index without animation - CurrentIndexAnimated
Sets the current index with animation - GlobalTabProperties As ASFlowTabMenu_Tab [read only]
Change this properties before you add tabs - IconHeight As Float
Gets or sets the icon Width and Height - Size As Int [read only]
- CurrentIndex As Int
- Events:
- ASFlowTabMenu_Tab
- Fields:
- Icon As B4XBitmap
- Index As Int
- IsInitialized As Boolean
Tests whether the object has been initialized. - Text As String
- TextColor As Int
- xFont As B4XFont
- Functions:
- Initialize
Initializes the fields to their default value.
- Initialize
- Fields:
- 1.00
- Release
- 1.01
- BugFix on RemoveTab
Attachments
Last edited: