B4A Library ðŸš€ Introducing TastyToast – Animated Notifications for B4A 🎉

Based on the original TastyToast thread, I have updated the library and added the confusion notification, inspired by the TastyToast repository.

📌 What's new in TastyToast?
✅ New animation to represent confusion.


💡 Special thanks to the original author for sharing the source code @Johan Schoeman , which made this update and adaptation possible for our community.

Example:
#Region  Project Attributes
    #ApplicationLabel: TastyToast - Wrapped by Johan Schoeman
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

'#AdditionalRes: ..\resource
#AdditionalRes: ..\resource_tastytoast

'IMPORTANT!!!! YOU NEED TO SET THIS PATH CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
'#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat
'#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\design\res, android.support.design
'#Extends: android.support.v7.app.AppCompatActivity

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
  
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Dim tt As TastyToast
  
  
    Private btnSuccess As Button
    Private btnWarning As Button
    Private btnError As Button
    Private btnInfo As Button
    Private btnDefault As Button
    Private Btnconfution As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
  
    Activity.LoadLayout("main")

    tt.Initialize

  
End Sub

Sub Activity_Resume
  
  
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub btnSuccess_Click
  
    tt.showSuccessToast("Download Successful !")
  
End Sub

Sub btnWarning_Click
  
    tt.showWarningToast("Are you sure ?")
  
End Sub

Sub btnError_Click
  
    tt.showErrorToast("Downloading failed ! Try again later ")
  
End Sub

Sub btnInfo_Click
  
    tt.showInfoToast("Searching for username : 'Johan' ")
  
End Sub

Sub btnDefault_Click
  
    tt.showDefaultToast("This is Default Toast")
  
End Sub

Private Sub Btnconfution_Click
    tt.showConfusingToast("This is Confusing Toast")
End Sub

📸 Screenshots
default.gif
info.gif
error.gif
warning.gif
success.gif
confusion.gif
 

Attachments

  • b4aTastyToast.zip
    13.2 KB · Views: 50
  • TastyToastLibFiles.zip
    59.4 KB · Views: 50
  • TastyToast source code.zip
    77.3 KB · Views: 45

fernando1987

Active Member
Licensed User
Now we are in Cross platform Era. Do we have similar for B4i?
Unfortunately, I don’t know, nor do I have a way to test it. However, the source code is included, and only an update was added, so it might be possible to adapt it for B4i. If anyone wants to try, feel free to share your results!
 
Top