QSL4A Documentation of
dialogShowAlert <QSL4A API Menu>dialogShowAlert( title = "Alert", message = "The message of the alert .", positiveButtonText = "OK", negativeButtonText = None, neutralButtonText = None, messageIsHtml = False )
Show the alert to the user .
title (String Optional) title of the alert box (default=Alert)
message (String Optional) message to display above the alert box (default=The message of the alert .)
positiveButtonText (String Optional) the text to show on the positive button (default=OK)
negativeButtonText (String Optional) the text to show on the negative button (default=None)
neutralButtonText (String Optional) the text to show on the neutral button (default=None)
messageIsHtml (Boolean) indicates message is Html or Plain Text (default=False)
Example :
from androidhelper import Android
droid = Android()
print(droid.dialogShowAlert("Title","Message","Done").result)
print(droid.dialogShowAlert("Title","<font color=red>Warning</font> Information","Yes","No","Cancel",True).result)
This function is the same as these code :
dialogShowAlert( title = "Alert", message = "The message of the alert .", positiveButtonText = "OK", negativeButtonText = None, neutralButtonText = None, messageIsHtml = False ):
droid.dialogCreateAlert(title,message)
droid.dialogSetMessageIsHtml(messageIsHtml)
droid.dialogSetPositiveButtonText(positiveButtonText)
droid.dialogSetNegativeButtonText(negativeButtonText)
droid.dialogSetNeutralButtonText(neutralButtonText)
droid.dialogShow()
return droid.dialogGetResponse()