Public Sub Initialize(act As B4XView)
Prepare the instance before its other methods.
Original catalog note: Initializes the object
ELEVATEUI · B4A · XUI
Display custom B4XView content inside a decision-oriented overlay.
Dialogs & notifications
Display custom B4XView content inside a decision-oriented overlay.
Animated conceptual demonstration, not an exact Android control screenshot.
When an operation needs confirmation or a result, process its response in the callback before updating the interface.
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 10: diálogo con contenido propio y botón funcional.
Sub Globals
Private customDialog As UICustomDialog
End Sub
Private Sub btnCustom_Click
Dim xui As XUI
customDialog.Initialize(Activity)
customDialog.setDlgColor(Colors.White)
customDialog.setTitlePanelColor(0xFF6554D9)
customDialog.setTittlepanelHeight(48dip)
customDialog.setTitlePanelVisible(True)
customDialog.setBubblepanels(True)
customDialog.setEnableAnimation(True)
customDialog.ShowDialog(5%x, 22%y, 90%x, 55%y)
Dim titlePanel As B4XView = customDialog.getTitlePanel
Dim dlgTitle As Label
dlgTitle.Initialize("")
dlgTitle.Text = "Custom dialog"
dlgTitle.TextColor = Colors.White
dlgTitle.TextSize = 18
dlgTitle.Gravity = Gravity.CENTER
titlePanel.AddView(dlgTitle, 8dip, 0, titlePanel.Width - 16dip, titlePanel.Height)
Dim content As B4XView = customDialog.getMainPanel
customDialog.AddTextMainPanel("Your own content goes here.", _
Colors.RGB(15, 23, 42), xui.CreateDefaultFont(16), _
12dip, 12dip, content.Width - 24dip, 55dip, "CENTER")
Dim closeButton As Button
closeButton.Initialize("customDialogClose")
closeButton.Text = "Close"
content.AddView(closeButton, 12dip, 76dip, content.Width - 24dip, 44dip)
End Sub
Private Sub customDialogClose_Click
customDialog.CloseDialog
Log("Custom dialog closed")
End Sub
18 audited signatures
Public Sub Initialize(act As B4XView)
Prepare the instance before its other methods.
Original catalog note: Initializes the object
Public Sub setTitlePanelColor(color As Int)
Update title panel color at runtime when this setting changes.
Original catalog note: Sets the color of the title panel
Public Sub getTitlePanelColor As Int
Read the current title panel color value for validation or UI synchronization.
Original catalog note: Returns the current color of the title panel
Returns: Int
Public Sub setTittlepanelHeight(Height As Double)
Update tittlepanel height at runtime when this setting changes.
Original catalog note: Sets the height of the title panel
Public Sub setTitlePanelVisible(visible As Boolean)
Update title panel visible at runtime when this setting changes.
Public Sub setCorner(Corner As Int)
Update corner at runtime when this setting changes.
Original catalog note: Sets the corner radius for the dialog and panels
Public Sub setDlgColor(color As Int)
Update dlg color at runtime when this setting changes.
Original catalog note: Sets the background color of the dialog
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 setBubblepanels(active As Boolean)
Update bubblepanels at runtime when this setting changes.
Original catalog note: Enables or disables bubble panels
Public Sub setEnableAnimation(active As Boolean)
Update enable animation at runtime when this setting changes.
Original catalog note: Enables or disables animations
Public Sub ShowDialog(PositionX As Int, PositionY As Int, Width As Int, Height As Int)
Use ShowDialog for its named operation; follow its exact signature.
Original catalog note: Displays the custom dialog at the specified position and size Displays the custom dialog at the specified position and size
Public Sub getPanelDialog As B4XView
Read the current panel dialog value for validation or UI synchronization.
Returns: B4XView
Public Sub getTitlePanel As B4XView
Read the current title panel value for validation or UI synchronization.
Original catalog note: Exposes the title panel for customization
Returns: B4XView
Public Sub getMainPanel As B4XView
Read the current main panel value for validation or UI synchronization.
Original catalog note: Exposes the main panel for customization
Returns: B4XView
Public Sub CloseDialog
Use CloseDialog for its named operation; follow its exact signature.
Original catalog note: Closes the dialog and removes all views
Public Sub AddTextMainPanel(Text As String, TextColor As Int, font As B4XFont, left As Int, top As Int, width As Int, height As Int,TextAlignment As String) As B4XView
Use AddTextMainPanel for its named operation; follow its exact signature.
Original catalog note: Adds text to the main panel and returns the label "LEFT","CENTER"
Returns: B4XView
No custom Designer properties were found in the audited API.
No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.