Difference between revisions of "AlertDialog"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <!-- GIDEROSOBJ:AlertDialog --> | ||
'''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> | ||
'''<translate>Available since</translate>:''' Gideros 2012.8<br/> | '''<translate>Available since</translate>:''' Gideros 2012.8<br/> | ||
Line 25: | Line 26: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Methods</translate> === | === <translate>Methods</translate> === | ||
− | [[Special:MyLanguage/AlertDialog.new|AlertDialog.new]] <br/> | + | [[Special:MyLanguage/AlertDialog.new|AlertDialog.new]] <br/><!-- GIDEROSMTD:AlertDialog.new --> |
− | [[Special:MyLanguage/AlertDialog:hide|AlertDialog:hide]] <br/> | + | [[Special:MyLanguage/AlertDialog:hide|AlertDialog:hide]] <br/><!-- GIDEROSMTD:AlertDialog:hide --> |
− | [[Special:MyLanguage/AlertDialog:show|AlertDialog:show]] <br/> | + | [[Special:MyLanguage/AlertDialog:show|AlertDialog:show]] <br/><!-- GIDEROSMTD:AlertDialog:show --> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
− | [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/> | + | [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE --> |
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
|} | |} |
Revision as of 14:55, 31 August 2018
Supported platforms:
Available since: Gideros 2012.8
Inherits from: Object
Description
The AlertDialog class is used to display native alert dialogs with one, two or three buttons. Cancel button
is mandatory but other two buttons are optional. When the user presses any button in the alert dialog,
it's dismissed and Event.COMPLETE event is dispatched.
If alert dialog is dismissed by any other means (by pressing back button on Android or by pressing close button on desktop), it behaves as cancel button is pressed.
Examples
Example
local alertDialog = AlertDialog.new("This is my title", "And my message", "Cancel", "Yes", "No")
local function onComplete(event)
print(event.buttonIndex, event.buttonText)
end
alertDialog:addEventListener(Event.COMPLETE, onComplete)
alertDialog:show()
Methods |
EventsConstants |