This is a wrap for this github project.
SweetAlertDialog
Author: DonManfred (wrapper)
Version: 1.2
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			SweetAlertDialog
Author: DonManfred (wrapper)
Version: 1.2
- ProgressHelper
Methods:- Initialize
 - IsInitialized As Boolean
 - isSpinning As Boolean
 - resetCount
 - spin
 - stopSpinning
 
- BarColor As Int
 - BarWidth As Int
 - CircleRadius As Int
 - InstantProgress As Float [write only]
 - Progress As Float
 - ProgressWheel As ProgressWheel
 - RimColor As Int
 - RimWidth As Int
 - SpinSpeed As Float
 
 - SweetAlertDialog
Events:- onCancel ( As )
 - onConfirm ( As )
 
- ondismiss ( As )
 
- Initialize (EventName As String)
 - IsInitialized As Boolean
 - cancel
The real Dialog.cancel() will be invoked async-ly after the animation finishes. - dismissWithAnimation
The real Dialog.dismiss() will be invoked async-ly after the animation finishes. - isShowCancelButton As Boolean
 - isShowContentText As Boolean
 - show
 - showCancelButton (isShow As Boolean) As SweetAlertDialogWrapper
 - showContentText (isShow As Boolean) As SweetAlertDialogWrapper
 - withCancelText (text As String) As SweetAlertDialogWrapper
 - withConfirmText (text As String) As SweetAlertDialogWrapper
 - withContentText (text As String) As SweetAlertDialogWrapper
 - withCustomImage (drawable As Drawable) As SweetAlertDialogWrapper
 - withCustomImageResource (resource As String) As SweetAlertDialogWrapper
 - withTitleText (text As String) As SweetAlertDialogWrapper
 
- AlertType As Int
 - CancelText As String [read only]
 - ConfirmText As String [read only]
 - ContentText As String [read only]
 - ProgressHelper As ProgressHelper [read only]
 - TitleText As String [read only]
 - TypeCustomImage As Int [read only]
 - TypeError As Int [read only]
 - TypeNormal As Int [read only]
 - TypeProgress As Int [read only]
 - TypeSuccess As Int [read only]
 - TypeWarning As Int [read only]
 
 
			
				B4X:
			
		
		
		Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim sweet As SweetAlertDialog
    Dim t As Timer
    Dim count As Int
    Dim helper As ProgressHelper
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("Layout1")
    count = 0
    t.Initialize("Timer",200)
    sweet.Initialize("Alert")
    sweet.AlertType = sweet.TypeCustomImage
    ' Get Progresshelper object.
    ' With the ProgressHelper you can change the Properties
    ' of the ProgressWheel. Start, stop spinning and so on...
    helper = sweet.ProgressHelper
End Sub
Sub Activity_Resume
    sweet.showCancelButton(False).showContentText(True).withConfirmText("I love it!").withContentText("SweetAlertDialogs Library").withTitleText("DonManfred present").withCustomImageResource("donmanfred").show
    't.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Alert_onCancel()
    Log($"Alert_onCancel()"$)
    sweet.AlertType = sweet.TypeError
    'sweet.withContentText("BLA bla BLA bla BLA")
    sweet.dismissWithAnimation
End Sub
Sub Alert_onConfirm()
    Log($"Alert_onConfirm()"$)
    sweet.dismissWithAnimation
End Sub
Sub Timer_Tick
    count = count +1
    If count < 100 Then
        sweet.withContentText($"Downloadfinished... ${count}"$)
    Else
        sweet.withContentText($"Downloading finished!"$)
        sweet.AlertType = sweet.TypeSuccess
        t.Enabled = False
    End If
End Sub
	Attachments
			
				Last edited: