Public Sub Initialize
Prepare the instance before its other methods.
ELEVATEUI · B4A · XUI
Display animated short-lived success, error or information feedback.
Dialogs & notifications
Display animated short-lived success, error or information feedback.
Animated conceptual demonstration, not an exact Android control screenshot.
Confirm save success, display an error or warn of missing input without blocking the current workflow.
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.
B4A Activity, XUI and ElevateUI. A native EditText is used for data entry because it is not replaced by this tutorial; the action and feedback use ElevateUI.
' UIButton + UITastyToast: show validation and success feedback
Sub Process_Globals
End Sub
Sub Globals
Private nameInput As UIEditText
Private saveButton As UIButton
Private notification As UITastyToast
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.Color = 0xFFF2F5FC
nameInput.Initialize(Me, "nameInput")
nameInput.AddToParent(Activity, "customerName", "Customer name", _
16dip, 24dip, Activity.Width - 32dip, 55dip, _
0xFF35B998, Colors.White, 0xFF243653, False, False)
nameInput.RequiredField = True
nameInput.HelperText = "Please enter the customer name."
saveButton.Initialize(Me, "saveButton")
saveButton.AddToParent(Activity, 16dip, 99dip, _
Activity.Width - 32dip, 48dip, 1, 16, "Save customer", _
Colors.White, 0xFF35B998, 0xFF19816D, "LEFT_RIGHT", 12dip)
notification.Initialize
notification.UseGradient = True
End Sub
Private Sub saveButton_Click
Dim name As String = nameInput.Text.Trim
If name.Length = 0 Then
nameInput.setError("Enter a customer name.")
notification.Warning("Enter a customer name.")
Return
End If
' Integrate the real persistence operation here.
Log("Ready to save: " & name)
notification.Info("Validated: " & name)
' Call notification.Success only AFTER your database confirms a save.
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause(UserClosed As Boolean)
End Sub
Review required libraries, Designer views and input data before compiling in B4A.
Sub Globals
Private Toast As UITastyToast
End Sub
Sub Activity_Create(FirstTime As Boolean)
Toast.Initialize
Toast.Duration = Toast.LENGTH_NORMAL
Toast.UseGradient = True
End Sub
Private Sub ButtonSave_Click
' Llamar a Toast.Success después de guardar.
Toast.Success("Datos guardados")
End Sub
Private Sub ButtonError_Click
Toast.Error("No se pudo completar la operación")
End Sub
Review required libraries, Designer views and input data before compiling in B4A.
Toast.Initialize
Toast.Duration = Toast.LENGTH_LONG
Toast.UseGradient = True
Toast.ProgressVisible = True
Toast.CornerRadius = 18dip
Toast.Info("Sincronizando información")
Dim progresoActivo As Boolean = Toast.ProgressVisible
Log(progresoActivo)
Review required libraries, Designer views and input data before compiling in B4A.
Toast.Initialize
Toast.CustomTypeface = Typeface.DEFAULT_BOLD
Toast.CustomBackColor = 0xFF1E293B
Toast.TextColor = Colors.White
Toast.ProgressVisible = True
Toast.Chart("Reporte generado")
Review required libraries, Designer views and input data before compiling in B4A.
' Toast.Initialize ya se ejecutó durante Activity_Create.
Toast.Sync("Sincronización completada")
Toast.Download("Archivo descargado")
Toast.Mail("Correo enviado")
Toast.ElectricMeter("Lectura del medidor registrada")
Toast.Lock("Acceso protegido")
56 audited signatures
Public Sub Initialize
Prepare the instance before its other methods.
Public Sub setUseGradient(UseGradient As Boolean)
Update use gradient at runtime when this setting changes.
Public Sub setDuration(DurationType As Int)
Update duration at runtime when this setting changes.
Public Sub Success(Message As String)
Use Success for its named operation; follow its exact signature.
Original catalog note: --- API methods ---
Public Sub Signal(Message As String)
Use Signal for its named operation; follow its exact signature.
Public Sub Battery(Message As String)
Use Battery for its named operation; follow its exact signature.
Public Sub Money(Message As String)
Use Money for its named operation; follow its exact signature.
Public Sub Done(Message As String)
Use Done for its named operation; follow its exact signature.
Public Sub Virus(Message As String)
Use Virus for its named operation; follow its exact signature.
Public Sub Warning(Message As String)
Use Warning for its named operation; follow its exact signature.
Public Sub Cat(Message As String)
Use Cat for its named operation; follow its exact signature.
Public Sub Dog(Message As String)
Use Dog for its named operation; follow its exact signature.
Public Sub Bug(Message As String)
Use Bug for its named operation; follow its exact signature.
Public Sub BoxCat(Message As String)
Use BoxCat for its named operation; follow its exact signature.
Public Sub Confused(Message As String)
Use Confused for its named operation; follow its exact signature.
Public Sub Pin(Message As String)
Use Pin for its named operation; follow its exact signature.
Public Sub Fire(Message As String)
Use Fire for its named operation; follow its exact signature.
Public Sub Info(Message As String)
Use Info for its named operation; follow its exact signature.
Public Sub Search(Message As String)
Use Search for its named operation; follow its exact signature.
Public Sub Cloud(Message As String)
Use Cloud for its named operation; follow its exact signature.
Public Sub Download(Message As String)
Use Download for its named operation; follow its exact signature.
Public Sub Windows(Message As String)
Use Windows for its named operation; follow its exact signature.
Public Sub Sync(Message As String)
Use Sync for its named operation; follow its exact signature.
Public Sub Snow(Message As String)
Use Snow for its named operation; follow its exact signature.
Public Sub Neutral(Message As String)
Use Neutral for its named operation; follow its exact signature.
Public Sub Config(Message As String)
Use Config for its named operation; follow its exact signature.
Public Sub Mail(Message As String)
Use Mail for its named operation; follow its exact signature.
Public Sub Chart(Message As String)
Use Chart for its named operation; follow its exact signature.
Public Sub Confetti(Message As String)
Use Confetti for its named operation; follow its exact signature.
Public Sub LoveFace(Message As String)
Use LoveFace for its named operation; follow its exact signature.
Public Sub Love(Message As String)
Use Love for its named operation; follow its exact signature.
Public Sub Angry(Message As String)
Use Angry for its named operation; follow its exact signature.
Public Sub Error(Message As String)
Use Error for its named operation; follow its exact signature.
Public Sub Kirby(Message As String)
Use Kirby for its named operation; follow its exact signature.
Public Sub Cake(Message As String)
Use Cake for its named operation; follow its exact signature.
Public Sub Bell(Message As String)
Use Bell for its named operation; follow its exact signature.
Public Sub Star(Message As String)
Use Star for its named operation; follow its exact signature.
Public Sub Sunflower(Message As String)
Use Sunflower for its named operation; follow its exact signature.
Public Sub Gift(Message As String)
Use Gift for its named operation; follow its exact signature.
Public Sub ElectricMeter(Message As String)
Use ElectricMeter for its named operation; follow its exact signature.
Public Sub Bulb(Message As String)
Use Bulb for its named operation; follow its exact signature.
Public Sub Ghost(Message As String)
Use Ghost for its named operation; follow its exact signature.
Public Sub Rainbow(Message As String)
Use Rainbow for its named operation; follow its exact signature.
Public Sub NoSignal(Message As String)
Use NoSignal for its named operation; follow its exact signature.
Public Sub Dice(Message As String)
Use Dice for its named operation; follow its exact signature.
Public Sub Rocket(Message As String)
Use Rocket for its named operation; follow its exact signature.
Public Sub Lock(Message As String)
Use Lock for its named operation; follow its exact signature.
Public Sub Sad(Message As String)
Use Sad for its named operation; follow its exact signature.
Public Sub FileAction(Message As String)
Use FileAction for its named operation; follow its exact signature.
Public Sub setCornerRadius(Radius As Int)
Update corner radius at runtime when this setting changes.
Public Sub getCornerRadius As Int
Read the current corner radius value for validation or UI synchronization.
Returns: Int
Public Sub setProgressVisible(Visible As Boolean)
Update progress visible at runtime when this setting changes.
Public Sub getProgressVisible As Boolean
Read the current progress visible value for validation or UI synchronization.
Returns: Boolean
Public Sub setCustomTypeface(tf As Typeface)
Update custom typeface at runtime when this setting changes.
Original catalog note: <code>Toast.CustomTypeface = Typeface.LoadFromAssets("mi-fuente.ttf")</code>
Public Sub setCustomBackColor(Color As Int)
Update custom back color at runtime when this setting changes.
Public Sub setTextColor(Clr As Int)
Update text color at runtime when this setting changes.
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.
Public Const LENGTH_SHORT As Int = 2500Public Const LENGTH_NORMAL As Int = 4500Public Const LENGTH_LONG As Int = 7000