Public Sub Initialize(Activity As B4XView, CallBack As Object, Event As String)
Prepare the instance before its other methods.
Original catalog note: Method to initialize the object
ELEVATEUI · B4A · XUI
Present a list of choices on its own page or selection dialog.
Navigation & onboarding
Present a list of choices on its own page or selection dialog.
Animated conceptual demonstration, not an exact Android control screenshot.
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.
Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.
Review required libraries, Designer views and input data before compiling in B4A.
' Ejemplo 12: selector de opciones. Pega en Main.
Private Sub btnSelection_Click
Dim xui As XUI
Dim selector As UISelectionPage
selector.Initialize(Activity, Me, "Choice")
selector.setHeaderText("Choose a status", Typeface.DEFAULT_BOLD, xui.Color_Black)
selector.setTextButton("Select")
selector.setColorButton(0xFF6554D9)
selector.AddItem("Pending", "pending")
selector.AddItem("In progress", "working")
selector.AddItem("Complete", "done")
selector.Show
End Sub
Private Sub Choice_ButtonClick(Index As Int, Value As String)
Log("Selected value: " & Value & " at " & Index)
End Sub
Private Sub Choice_ButtonClick2(Index As Int, Name As String)
Log("Selected label: " & Name)
End Sub
' El proyecto adjunto también demuestra AddItemWithIcon y
' AddItemWithImage. En esos casos debes incluir el recurso de imagen
' en File.DirAssets o inicializar previamente UIIconFont.
20 audited signatures
Public Sub Initialize(Activity As B4XView, CallBack As Object, Event As String)
Prepare the instance before its other methods.
Original catalog note: Method to initialize the object
Public Sub Show
Use Show for its named operation; follow its exact signature.
Original catalog note: Method to display the custom view
Public Sub Close
Use Close for its named operation; follow its exact signature.
Public Sub setHeaderText(Header As String, HeaderTypeface As Typeface, color As Int)
Update header text at runtime when this setting changes.
Original catalog note: Method to set the header text
Public Sub setTextButton(text As String)
Update text button at runtime when this setting changes.
Original catalog note: Method to set the button text Method to set the button text
Public Sub setColorButton(Color As Int)
Update color button at runtime when this setting changes.
Original catalog note: Method to set the button color
Public Sub setDialogBackgroundColor(Color As Int)
Update dialog background color at runtime when this setting changes.
Original catalog note: Sets the background color of the complete dialog surface or selection panel. Supply an ARGB color (e.g., 0xFF202536).
Public Sub setDialogBorderColor(Color As Int)
Update dialog border color at runtime when this setting changes.
Original catalog note: Sets the border color for the complete dialog surface. Supply an ARGB color.
Public Sub setDialogBorderWidth(Width As Float)
Update dialog border width at runtime when this setting changes.
Original catalog note: Sets the border stroke width for the complete dialog surface; zero hides the border.
Public Sub setSelectionColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getSelectionColor As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setButtonElevation(Elevation As Float, color As Int)
Update button elevation at runtime when this setting changes.
Original catalog note: Method to set the button elevation (shadow)
Public Sub AddItem(title As String, itemValue As String, icon As String = "")
Use AddItem for its named operation; follow its exact signature.
Original catalog note: Adds a text-only item. The optional icon keeps the previous asset-based call compatible.
Public Sub AddItemWithIcon(title As String, itemValue As String, Icon As Char, IconFont As B4XFont, IconColor As Int)
Use AddItemWithIcon for its named operation; follow its exact signature.
Original catalog note: Adds an item with a font icon and its own color.
Public Sub AddItemWithImage(title As String, itemValue As String, Dir As String, FileName As String)
Use AddItemWithImage for its named operation; follow its exact signature.
Original catalog note: Adds an item with an image loaded from the given directory and file name.
Public Sub setSelectedIndex As Int
Update selected index at runtime when this setting changes.
Original catalog note: Method to get the index of the selected item
Returns: Int
Public Sub setSelectedValue As String
Update selected value at runtime when this setting changes.
Original catalog note: Method to get the value of the selected item
Returns: String
Public Sub setListView As CustomListView
Update list view at runtime when this setting changes.
Original catalog note: Method to get the CustomListView
Returns: CustomListView
Public Sub setSelectedItemByValue(itemValue As String)
Update selected item by value at runtime when this setting changes.
Original catalog note: Method to programmatically select an item
Public Sub setSelectedItemByText(itemText As String)
Update selected item by text at runtime when this setting changes.
Original catalog note: Method to programmatically select an item by its label text
No custom Designer properties were found in the audited API.
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.
Raised when the user taps the control; use it to trigger a real action.
B4A handler signature with Demo prefix
Private Sub Demo_ButtonClick(index As Int, value As String)
Log("ButtonClick")
End Sub
Raised when the user taps the control; use it to trigger a real action.
B4A handler signature with Demo prefix
Private Sub Demo_ButtonClick2(index As Int, Name As String)
Log("ButtonClick2")
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.