Public Sub Initialize(act As B4XView, Callback As Object, Eventname As String)
Prepare the instance before its other methods.
Original catalog note: Initializes the object. You can add parameters to this method if needed.
ELEVATEUI · B4A · XUI
Give progress and status feedback for file-download operations.
Dialogs & notifications
Give progress and status feedback for file-download operations.
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 9: vista de demostración del diálogo, como en UIDialogs.zip.
' El progreso aquà es simulado, NO representa una descarga real.
' Para producción conecta setProgress al número de bytes recibidos.
Sub Globals
Private downloadDialog As UIDownloadDialog
End Sub
Private Sub btnDownload_Click
downloadDialog.Initialize(Activity, Me, "DownloadPreview")
downloadDialog.setTitle("Download preview")
downloadDialog.setDescription("Demo only: no network transfer is running.")
downloadDialog.setStartMessage("Waiting for a download")
downloadDialog.ButtonText = "Download"
downloadDialog.Show
downloadDialog.setProgress(20)
Sleep(1500)
downloadDialog.setProgress(100)
End Sub
Private Sub DownloadPreview_Submit
Log("Connect a real download operation here")
End Sub
Private Sub DownloadPreview_Cancel
Log("Download preview closed")
End Sub
Private Sub DownloadPreview_SuccessAction
Log("Download success action selected")
End Sub
41 audited signatures
Public Sub Initialize(act As B4XView, Callback As Object, Eventname As String)
Prepare the instance before its other methods.
Original catalog note: Initializes the object. You can add parameters to this method if needed.
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 Show
Use Show for its named operation; follow its exact signature.
Original catalog note: Method to show the UI elements
Public Sub setCloseButtonIcon(Icon As Char, IconColor As Int, Font As B4XFont, TextSize As Float)
Update close button icon at runtime when this setting changes.
Original catalog note: Method to set the icon, color and font of the close button
Public Sub setTitle(Title As String)
Update title at runtime when this setting changes.
Original catalog note: Set and Get methods for title
Public Sub getTitle As String
Read the current title value for validation or UI synchronization.
Returns: String
Public Sub setDescription(desc As String)
Update description at runtime when this setting changes.
Original catalog note: Set and Get methods for description
Public Sub getDescription As String
Read the current description value for validation or UI synchronization.
Returns: String
Public Sub setImagelogo(img As Bitmap)
Update imagelogo at runtime when this setting changes.
Original catalog note: Set and Get methods for image logo
Public Sub getLogo As Bitmap
Read the current logo value for validation or UI synchronization.
Returns: Bitmap
Public Sub setlogo2(icon As Char, IconColor As Int, Font As B4XFont)
Update logo2 at runtime when this setting changes.
Original catalog note: Set logo with character, color, and font
Public Sub setColorButton(Bcolor As Int)
Update color button at runtime when this setting changes.
Original catalog note: Set and Get methods for button color
Public Sub setAnimateImage(Animate As Boolean)
Update animate image at runtime when this setting changes.
Original catalog note: Set and Get methods for image animation
Public Sub getAnimateImage As Boolean
Read the current animate image value for validation or UI synchronization.
Returns: Boolean
Public Sub setAnimationBubble(animate As Boolean)
Update animation bubble at runtime when this setting changes.
Original catalog note: Set and Get methods for bubble animation
Public Sub getAnimateBubble As Boolean
Read the current animate bubble value for validation or UI synchronization.
Returns: Boolean
Public Sub setColor(SkinColor As Int)
Update color at runtime when this setting changes.
Original catalog note: Set and Get methods for skin color
Public Sub getColor As Int
Read the current color value for validation or UI synchronization.
Returns: Int
Public Sub setButtonText(text As String)
Update button text at runtime when this setting changes.
Original catalog note: Set and Get methods for button text
Public Sub getButtonText As String
Read the current button text value for validation or UI synchronization.
Returns: String
Public Sub setBubbleDesign(IsBubble As Boolean)
Update bubble design at runtime when this setting changes.
Original catalog note: Set and Get methods for bubble design
Public Sub getBubbleDesign As Boolean
Read the current bubble design value for validation or UI synchronization.
Returns: Boolean
Public Sub setButtonIcon(Icon As Char, IconColor As Int, IconTypeface As Typeface)
Update button icon at runtime when this setting changes.
Original catalog note: Set button icon with character, color, and typeface
Public Sub setButtonImage(dir As String, ImageName As String)
Update button image at runtime when this setting changes.
Original catalog note: Set button image from file
Public Sub setProgress(Progress As Int)
Update progress at runtime when this setting changes.
Original catalog note: Set progress value and update UI
Public Sub setStallTimeoutMs(TimeoutMs As Int)
Update stall timeout ms at runtime when this setting changes.
Original catalog note: El diálogo no descarga archivos: el llamador informa errores con ShowError. Opcionalmente detecta ausencia de actualizaciones de progreso tras pulsar Iniciar.
Public Sub ShowSuccess
Use ShowSuccess for its named operation; follow its exact signature.
Public Sub ShowError(Message As String)
Use ShowError for its named operation; follow its exact signature.
Public Sub setSuccessTitle(Value As String)
Update success title at runtime when this setting changes.
Public Sub setSuccessDescription(Value As String)
Update success description at runtime when this setting changes.
Public Sub setSuccessButtonText(Value As String)
Update success button text at runtime when this setting changes.
Public Sub setSuccessCloseText(Value As String)
Update success close text at runtime when this setting changes.
Public Sub setErrorTitle(Value As String)
Update error title at runtime when this setting changes.
Public Sub setErrorDescription(Value As String)
Update error description at runtime when this setting changes.
Public Sub setErrorButtonText(Value As String)
Update error button text at runtime when this setting changes.
Public Sub setErrorCloseText(Value As String)
Update error close text at runtime when this setting changes.
Public Sub setFinishedMessage(FinishedMessage As String)
Update finished message at runtime when this setting changes.
Original catalog note: Set finished message
Public Sub setStartMessage(Message As String)
Update start message at runtime when this setting changes.
Original catalog note: Set start message
Public Sub setCornerRadius(Radius As Float)
Update corner radius at runtime when this setting changes.
Original catalog note: Set corner radius for panels
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.
Receives the user confirmation; validate parameters before saving.
B4A handler signature with Demo prefix
Private Sub Demo_Submit ' Event for submit action()
Log("Submit ' Event for submit action")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_Cancel ' Event for cancel action()
Log("Cancel ' Event for cancel action")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_SuccessAction()
Log("SuccessAction")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_ErrorAction()
Log("ErrorAction")
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.