B4J Library [ABMaterial]: MashAlerts

Hi y'all


This is a custom component that you can place in any RC location and also animate using animate.css.

You are able to trap the click events for ok, cancel and close. You can optionally have buttons and an image. It's themed also using the respective colors and intensities.

Events:

B4X:
Sub alert_click(value As Map)
    Dim valuex As String = value.Getdefault("value","")
    'page.Msgbox("",valuex,"","OK",False,"","")
    Select Case valuex
    Case "ok"
            alert.Animate(ABMShared.Anime.Specials_hinge,False,alert.hidescript)
    Case "cancel"
        page.Msgbox("",valuex,"","OK",False,"","")
    Case "close"
        'page.Msgbox("",valuex,"","OK",False,"","")
    End Select
End Sub

Adding the component to your page:

B4X:
ABMShared.AddTheme("alert","","",ABM.COLOR_LIGHTBLUE,ABM.INTENSITY_LIGHTEN5)
    alert.Initialize(page,"alert")
    alert.Normal("NEWS : You have done 5 actions.")
    alert.UserImage = "../images/sponge.png"
    alert.ShowOKCancel = True
    page.Cell(2,1).addcomponent(alert.ABMcomp)
   
    alert1.Initialize(page,"alert1")
    alert1.danger("DANGER : The daily report has failed.")
    'alert1.UserImage = "../images/sponge.png"
    'alert1.ShowOKCancel = True
    page.Cell(2,2).addcomponent(alert1.ABMcomp)

This is DonationWare
 
Top