Hello there,
I made a very simple example to explain my problem. In this code, I show one alert every time that user clicks on Activity. It works in the first time, but in the second time, the app freezes and do not show the alert box.
I made a very simple example to explain my problem. In this code, I show one alert every time that user clicks on Activity. It works in the first time, but in the second time, the app freezes and do not show the alert box.
Sample:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
'
' WARNING!!!!
' The order of the following #AdditionalRes-lines
' must be exact like this
#AdditionalRes: ..\res.MaterialIshProgress
#AdditionalRes: ..\res.SweetAlertDialog
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 sweet As SweetAlertDialog
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")
sweet.Initialize("Alert")
sweet.AlertType = sweet.TypeWarning
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Click
sweet.showCancelButton(True).showContentText(True).withCancelText("Not yet").withConfirmText("Yo man").withContentText("Bla bla bla bla").withTitleText("DonManfred present").show
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