B4A Library [B4X] BCToast - Cross platform custom toast message


Staff member
Licensed User
BCToast is a custom "toast" message implementation based on BCTextEngine: https://www.b4x.com/android/forum/threads/b4x-bctextengine-bbcodeview-text-engine-bbcode-parser-rich-text-view.106207/#content

It requires BCTextEngine v1.65+.

Note that unlike B4A built-in toast message feature, this toast message can only be displayed from an Activity.

Usage example:
Sub Globals
   Private toast As BCToast
End Sub

Sub Activity_Create(FirstTime As Boolean)
   toast.Initialize(Activity) 'Use Page1.RootPanel in B4i or MainForm.RootPane in B4J.
End Sub

Sub Activity_Click
   toast.Show($"The time now is [b]$Time{DateTime.Now}[/b]"$)
End Sub
Default duration is set to 3000 ms. It can be changed with the DurationMs field.
The text itself is highly customizable. See BCTextEngine for more information.


Last edited: