B4X Store

ELEVATEUI · B4A · XUI

UIBtnFloating

Keep one important action accessible while content scrolls.

78 modules 1,780 APIs

Effects & interface utilities

What it solves

Keep one important action accessible while content scrolls.

Animated conceptual demonstration, not an exact Android control screenshot.

28 methods2 Designer2 events

When to use this module

Use a floating action menu on a table editor: add a row directly or open the new-column form without leaving the table.

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.

Build an editable table with a floating menu and a working column-name dialog
Reviewed integration tutorial ElevateUI(6).b4xlib: Snippets/Add UIEditableTable.txt; audited against public methods/events Not B4A-compiled

B4A Activity with ElevateUI and XUI libraries enabled. No Designer views are required; this example creates the controls in code.

' ElevateUI sample: a floating menu controlling a real editable table.
' B4A libraries: XUI and ElevateUI.
Sub Process_Globals
    Private xui As XUI
End Sub

Sub Globals
    Private root As B4XView
    Private sampleEditableTable As UIEditableTable
    Private menu As UIBtnFloating
    Private columnNameDialog As UIImputDialog
End Sub

Sub Activity_Create(FirstTime As Boolean)
    root = xui.CreatePanel("")
    Activity.AddView(root, 0, 0, Activity.Width, Activity.Height)
    root.Color = Colors.RGB(248, 250, 252)

    sampleEditableTable.Initialize(Me, "SampleTable")
    sampleEditableTable.AddToParent(root, 10dip, 12dip, _
        root.Width - 20dip, root.Height - 24dip)
    sampleEditableTable.AddColumns(Array As String("Code", "Name", "Amount"))
    sampleEditableTable.AddRow(Array As String("A-01", "First item", "36.39"))
    sampleEditableTable.AddRow(Array As String("A-02", "Second item", "18.50"))

    menu.Initialize(Me, "menu")
    menu.AddToParent(root, root.Width - 70dip, _
        root.Height - 82dip, 56dip, 56dip, 0xFF35B998)
    menu.InitializeMenu(False, root)
    menu.additemIcon("Add row", Colors.White, 14, Chr(0xE145), _
        xui.CreateMaterialIcons(20), Colors.White, 0xFF35B998)
    menu.additemIcon("Add column", Colors.White, 14, Chr(0xE8EC), _
        xui.CreateMaterialIcons(20), Colors.White, 0xFF3478C8)
End Sub

Private Sub menu_ItemClicked(item As String, index As Int)
    Select index
        Case 0
            sampleEditableTable.AddEmptyRow
        Case 1
            columnNameDialog.Initialize(root, Me, "NewColumn")
            columnNameDialog.setTitle("Add column")
            columnNameDialog.Description = "Choose a name for the new table column."
            columnNameDialog.setHintText("Enter a column name")
            columnNameDialog.setSubmitText("Add")
            columnNameDialog.setCancelText("Cancel")
            columnNameDialog.show
    End Select
End Sub

Private Sub NewColumn_Submit(Text As String)
    Dim columnName As String = Text.Trim
    If columnName <> "" Then
        sampleEditableTable.AddColumn(columnName)
    Else
        ToastMessageShow("Enter a column name.", False)
    End If
End Sub

Private Sub SampleTable_CellClick(Col As Int, Row As Int)
    Log("Selected cell " & Col & ", " & Row & ": " & _
        sampleEditableTable.GetValue(Col, Row))
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause(UserClosed As Boolean)
End Sub

Public methods reference

28 audited signatures

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

Prepare the instance before its other methods.

Original catalog note: Initializes the view with a callback and event name

Callback As ObjectEventName As String
Public Sub InitializeMenu(Down As Boolean, Activity As B4XView)

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

Down As BooleanActivity As B4XView
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

Base As ObjectLbl As LabelProps As Map
Public Sub AddToParent(Parent As B4XView, l As Int, t As Int, w As Int, h As Int, Color As Int)

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

Original catalog note: Adds the view to a parent with specified dimensions and color

Parent As B4XViewl As Intt As Intw As Inth As IntColor As Int
Public Sub setColor(color As Int)

Update color at runtime when this setting changes.

Original catalog note: Sets the background color of the view

color As Int
Public Sub getColor As Int

Read the current color value for validation or UI synchronization.

Original catalog note: Returns the current background color of the view

Returns: Int

Public Sub setCornerRadius(Radius As Float)

Update corner radius at runtime when this setting changes.

Original catalog note: Sets the corner radius of the main floating button.

Radius As Float
Public Sub getCornerRadius As Float

Read the current corner radius value for validation or UI synchronization.

Original catalog note: Returns the corner radius of the main floating button.

Returns: Float

Public Sub setlcon(font As B4XFont, Icon As String)

Update lcon at runtime when this setting changes.

Original catalog note: Draws an icon on the view using a real Label so font glyphs render reliably.

font As B4XFontIcon As String
Public Sub SetIconGlow(Radius As Float, GlowColor As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Radius As FloatGlowColor As Int
Public Sub setIconColor(color As Int)

Update icon color at runtime when this setting changes.

Original catalog note: Sets the color of the icon

color As Int
Public Sub getIconColor As Int

Read the current icon color value for validation or UI synchronization.

Original catalog note: Returns the current icon color

Returns: Int

Public Sub setlogo(filedir As String, filename As String)

Update logo at runtime when this setting changes.

Original catalog note: Sets a logo image on the view

filedir As Stringfilename As String
Public Sub GetBase As Panel

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

Original catalog note: Returns the base panel of the view

Returns: Panel

Public Sub setLeft(Left As Int)

Update left at runtime when this setting changes.

Original catalog note: Sets the left position of the view

Left As Int
Public Sub setTop(Top As Int)

Update top at runtime when this setting changes.

Original catalog note: Sets the top position of the view

Top As Int
Public Sub setVisible(Flag As Boolean)

Update visible at runtime when this setting changes.

Original catalog note: Sets the visibility of the view

Flag As Boolean
Public Sub Elevation(BtElevation 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

BtElevation As Floatcolor As Int
Public Sub isOpen As Boolean

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

Original catalog note: Checks if the menu is currently open. @return Boolean: True if the menu is visible, False otherwise.

Returns: Boolean

Public Sub dismiss

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

Original catalog note: Dismisses the menu.

Public Sub ItemLabel(index As Int) As Label

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

Original catalog note: Gets the label of an item by index. @param index: The index of the item. @return Label: The label of the item.

index As Int

Returns: Label

Public Sub ItemImage(index As Int) As ImageView

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

Original catalog note: Gets the image view of an item by index. @param index: The index of the item. @return ImageView: The image view of the item.

index As Int

Returns: ImageView

Public Sub ItemIcon(index As Int) As Label

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

Original catalog note: Gets the icon label of an item by index. @param index: The index of the item. @return Label: The icon label of the item.

index As Int

Returns: Label

Public Sub SetItemIconGlow(Index As Int, Radius As Float, GlowColor As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Index As IntRadius As FloatGlowColor As Int
Public Sub SetItemIconGlowByText(ItemText As String, Radius As Float, GlowColor As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

ItemText As StringRadius As FloatGlowColor As Int
Public Sub getItemHeight As Int

Read the current item height value for validation or UI synchronization.

Original catalog note: Gets the height of an item. @return Int: The height of the item.

Returns: Int

Public Sub additemImage(Text As String, txtColor As Int, txtsize As Int, ImageDir As String, ImageFile As String, BackgroundColor As Int)

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

Original catalog note: @param Text: The text of the item. @param txtColor: The color of the text. @param txtsize: The size of the text. @param ImageDir: The directory of the image. @param ImageFile: The file name of the image. @param BackgroundColor: The background color of the item.

Text As StringtxtColor As Inttxtsize As IntImageDir As StringImageFile As StringBackgroundColor As Int
Public Sub additemIcon(Text As String, txtColor As Int, txtsize As Int, Icon As Char, IconFont As B4XFont, Iconcolor As Int, BackgroundColor As Int)

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

Original catalog note: @param txtColor: The color of the text. @param txtsize: The size of the text. @param Icon: The icon character. @param IconFont: The font of the icon. @param Iconcolor: The color of the icon. @param BackgroundColor: The background color of the item.

Text As StringtxtColor As Inttxtsize As IntIcon As CharIconFont As B4XFontIconcolor As IntBackgroundColor As Int

Designer · 2

#DesignerProperty: Key: IconColor, DisplayName: Icon Color, FieldType: color, DefaultValue: 0xFFFFFFFF, Description: Icon text color. You can use the built-in color picker to find the color values.#DesignerProperty: Key: ColorExample, DisplayName: Color Example, FieldType: Color, DefaultValue: 0xFF35B998, Description: You can use the built-in color picker to find the color values.

Public events and how to implement them · 2

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.

Clicked(open As Boolean)

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

B4A handler signature with Demo prefix

Private Sub Demo_Clicked(open As Boolean)
    Log("Clicked")
End Sub
ItemClicked (item As String, index 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(item As String, index 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 B4XView ' Base viewPublic Tag As Object ' Tag for additional dataPublic AnimationType As Int = 0
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.