B4X Store

ELEVATEUI · B4A · XUI

UITastyToast

Display animated short-lived success, error or information feedback.

78 modules 1,780 APIs

Dialogs & notifications

What it solves

Display animated short-lived success, error or information feedback.

Animated conceptual demonstration, not an exact Android control screenshot.

56 methods0 Designer0 events

When to use this module

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.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Save form feedback using UIButton and UITastyToast
Reviewed integration tutorial Adapted from uploaded UITastyToast(1).zip and ElevateUI(6) API Not B4A-compiled

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
Success and error notifications when saving
Existing documentation example uitastytoast.json Not B4A-compiled

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
Duration, gradients and progress indicator
Existing documentation example uitastytoast.json Not B4A-compiled

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)
Customize the message typeface and colors
Existing documentation example uitastytoast.json Not B4A-compiled

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")
Choose a toast icon based on the operation
Existing documentation example uitastytoast.json Not B4A-compiled

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")

Public methods reference

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.

UseGradient As Boolean
Public Sub setDuration(DurationType As Int)

Update duration at runtime when this setting changes.

DurationType As Int
Public Sub Success(Message As String)

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

Original catalog note: --- API methods ---

Message As String
Public Sub Signal(Message As String)

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

Message As String
Public Sub Battery(Message As String)

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

Message As String
Public Sub Money(Message As String)

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

Message As String
Public Sub Done(Message As String)

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

Message As String
Public Sub Virus(Message As String)

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

Message As String
Public Sub Warning(Message As String)

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

Message As String
Public Sub Cat(Message As String)

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

Message As String
Public Sub Dog(Message As String)

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

Message As String
Public Sub Bug(Message As String)

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

Message As String
Public Sub BoxCat(Message As String)

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

Message As String
Public Sub Confused(Message As String)

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

Message As String
Public Sub Pin(Message As String)

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

Message As String
Public Sub Fire(Message As String)

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

Message As String
Public Sub Info(Message As String)

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

Message As String
Public Sub Search(Message As String)

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

Message As String
Public Sub Cloud(Message As String)

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

Message As String
Public Sub Download(Message As String)

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

Message As String
Public Sub Windows(Message As String)

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

Message As String
Public Sub Sync(Message As String)

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

Message As String
Public Sub Snow(Message As String)

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

Message As String
Public Sub Neutral(Message As String)

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

Message As String
Public Sub Config(Message As String)

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

Message As String
Public Sub Mail(Message As String)

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

Message As String
Public Sub Chart(Message As String)

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

Message As String
Public Sub Confetti(Message As String)

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

Message As String
Public Sub LoveFace(Message As String)

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

Message As String
Public Sub Love(Message As String)

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

Message As String
Public Sub Angry(Message As String)

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

Message As String
Public Sub Error(Message As String)

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

Message As String
Public Sub Kirby(Message As String)

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

Message As String
Public Sub Cake(Message As String)

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

Message As String
Public Sub Bell(Message As String)

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

Message As String
Public Sub Star(Message As String)

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

Message As String
Public Sub Sunflower(Message As String)

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

Message As String
Public Sub Gift(Message As String)

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

Message As String
Public Sub ElectricMeter(Message As String)

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

Message As String
Public Sub Bulb(Message As String)

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

Message As String
Public Sub Ghost(Message As String)

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

Message As String
Public Sub Rainbow(Message As String)

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

Message As String
Public Sub NoSignal(Message As String)

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

Message As String
Public Sub Dice(Message As String)

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

Message As String
Public Sub Rocket(Message As String)

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

Message As String
Public Sub Lock(Message As String)

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

Message As String
Public Sub Sad(Message As String)

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

Message As String
Public Sub FileAction(Message As String)

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

Message As String
Public Sub setCornerRadius(Radius As Int)

Update corner radius at runtime when this setting changes.

Radius As Int
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.

Visible As Boolean
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>

tf As Typeface
Public Sub setCustomBackColor(Color As Int)

Update custom back color at runtime when this setting changes.

Color As Int
Public Sub setTextColor(Clr As Int)

Update text color at runtime when this setting changes.

Clr As Int

Designer · 0

No custom Designer properties were found in the audited API.

Public events and how to implement them · 0

No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.

Public fields, constants and types

Public Const LENGTH_SHORT As Int = 2500Public Const LENGTH_NORMAL As Int = 4500Public Const LENGTH_LONG As Int = 7000
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.