B4X Store

ELEVATEUI · B4A · XUI

UITabBar

Switch between major views using a persistent tab navigation bar.

78 modules 1,780 APIs

Navigation & onboarding

What it solves

Switch between major views using a persistent tab navigation bar.

Animated conceptual demonstration, not an exact Android control screenshot.

20 methods8 Designer1 events

When to use this module

In a multi-screen application, connect every menu action to a real destination and preserve the active selection.

Before integrating, examine its methods, events and Designer options.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Practical tutorial awaiting verification

The public API, events and properties remain available. An isolated initialization is not presented as a full example; a tutorial will be added after a functional sequence is documented.

Public methods reference

20 audited signatures

Public Sub Initialize (Callback As Object, EventName As String)

Prepare the instance before its other methods.

Original catalog note: Initializes the component and assigns the callback and event name. This is called when the component is created.

Callback As ObjectEventName As String
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Original catalog note: Creates the view in the designer and sets up initial properties. This is called when the component is added to the designer.

Base As ObjectLbl As LabelProps As Map
Public Sub AddToParent(parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Add this view to a parent container using the supplied bounds and options.

Original catalog note: Adds the component to a parent container with the specified dimensions. This is used to programmatically add the component to a layout.

parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub setCornerRadius(Radius As Int)

Update corner radius at runtime when this setting changes.

Original catalog note: Sets the corner radius of the component. This is used to round the corners of the component.

Radius As Int
Public Sub AddOption(Text As String)

Use AddOption for its named operation; follow its exact signature.

Original catalog note: Adds a single option (tab) to the TabBar. This is used to add a new tab with the specified text.

Text As String
Public Sub AddOptions(Texts As List)

Use AddOptions for its named operation; follow its exact signature.

Original catalog note: Adds multiple options (tabs) to the TabBar. This is used to add multiple tabs at once using a list of texts.

Texts As List
Public Sub Show

Use Show for its named operation; follow its exact signature.

Original catalog note: Displays the component in the UI. This is called to render the component after adding options.

Public Sub setActive(Number As Int)

Update active at runtime when this setting changes.

Original catalog note: Sets the active tab by index. This is used to programmatically set the active tab.

Number As Int
Public Sub setActive2(Text As String)

Update active2 at runtime when this setting changes.

Original catalog note: Sets the active tab by text. This is used to programmatically set the active tab using the tab's text.

Text As String
Public Sub setActiveColor(Color As Int)

Update active color at runtime when this setting changes.

Original catalog note: Changes the color of the active tab. This is used to customize the appearance of the active tab.

Color As Int
Public Sub setTextColor(Color As Int)

Update text color at runtime when this setting changes.

Original catalog note: Changes the text color of inactive tabs. This is used to customize the appearance of inactive tabs.

Color As Int
Public Sub setTextSize(sizee As Int)

Update text size at runtime when this setting changes.

Original catalog note: Changes the text size of the tabs. This is used to customize the font size of the tab text.

sizee As Int
Public Sub setFonts(setfont As B4XFont)

Update fonts at runtime when this setting changes.

Original catalog note: Changes the font of the tab text. This is used to customize the font style of the tab text.

setfont As B4XFont
Public Sub setAnimationTime(MilliSecond As Int)

Update animation time at runtime when this setting changes.

Original catalog note: Changes the duration of the animation. This is used to customize the speed of the tab switching animation.

MilliSecond As Int
Public Sub setBackgroundColor(Color As Int)

Update background color at runtime when this setting changes.

Original catalog note: Changes the background color of the component. This is used to customize the background color of the TabBar.

Color As Int
Public Sub setBorderColor(BorderColor As Int)

Update border color at runtime when this setting changes.

Original catalog note: Changes the border color of the component. This is used to customize the border color of the TabBar.

BorderColor As Int
Public Sub getSize As Int

Read the current size value for validation or UI synchronization.

Original catalog note: Returns the number of tabs in the component. This is used to get the total count of tabs.

Returns: Int

Public Sub getTexts As List

Read the current texts value for validation or UI synchronization.

Original catalog note: Returns the list of texts for the tabs. This is used to retrieve the text of all tabs.

Returns: List

Public Sub Elevation(TabElevation As Float, color As Int)

Use Elevation for its named operation; follow its exact signature.

Original catalog note: Sets the elevation (shadow) of the view

TabElevation As Floatcolor As Int
Public Sub SetTabGlow(Index As Int, Radius As Float, GlowColor As Int)

Use SetTabGlow for its named operation; follow its exact signature.

Original catalog note: Applies a glowing shadow effect to a specific tab label by its index (0-based)

Index As IntRadius As FloatGlowColor As Int

Designer · 8

#DesignerProperty: Key: TextColor, DisplayName: Text Color, FieldType: Color, DefaultValue: 0xFF3C4043, Description: Text color (Modern gray)#DesignerProperty: Key: ActiveColor, DisplayName: Active Color, FieldType: Color, DefaultValue: 0xFF1E88E5, Description: Active Color (Modern blue)#DesignerProperty: Key: BackgroundColor, DisplayName: Background Color, FieldType: Color, DefaultValue: 0xFFF5F5F5, Description: Background Color (Light gray)#DesignerProperty: Key: BorderColor, DisplayName: Border Color, FieldType: Color, DefaultValue: 0xFFB0BEC5, Description: Border Color (Soft gray)#DesignerProperty: Key: TextSize, DisplayName: Text Size, FieldType: Int, DefaultValue: 16, MinRange: 12, MaxRange: 24, Description: Text Size (Improved range)#DesignerProperty: Key: BorderWidth, DisplayName: Border Width, FieldType: Int, DefaultValue: 0, MinRange: 0, MaxRange: 10, Description: Border Width (Default moderate)#DesignerProperty: Key: AnimationDuration, DisplayName: Animation Duration, FieldType: String, DefaultValue: Normal, List: Fast|Normal|Slow, Description: Animation Duration#DesignerProperty: Key: CornerRadius, DisplayName: Corner Radius, FieldType: Int, DefaultValue: 50, MinRange: 0, MaxRange: 50, Description: Corner Radius for rounded corners

Public events and how to implement them · 1

Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.

itemClicked (ItemName As String,ItemIndex as int)

Raised when the user taps the control; use it to trigger a real action.

B4A handler signature with Demo prefix

Private Sub Demo_itemClicked(ItemName As String,ItemIndex as int)
    Log("itemClicked")
End Sub

For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.

Public fields, constants and types

Public mBase As B4XViewPublic Tag As Object
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.