Difference between revisions of "TextInputDialog"
Line 19: | Line 19: | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
− | [[TextInputDialog.new]] | + | [[TextInputDialog.new]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:getInputType]] | + | [[TextInputDialog:getInputType]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:getText]] | + | [[TextInputDialog:getText]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:isSecureInput]] | + | [[TextInputDialog:isSecureInput]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:setInputType]] | + | [[TextInputDialog:setInputType]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:setSecureInput]] | + | [[TextInputDialog:setSecureInput]] {{<translate></translate>}}<br/> |
− | [[TextInputDialog:setText]] | + | [[TextInputDialog:setText]] {{<translate></translate>}}<br/> |
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === |
Revision as of 14:19, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2012.8
Description
The TextInputDialog class is used to display native text input dialogs with one text edit field, one button (as cancel button) and two optional buttons. When the user presses any buttons in the alert dialog, it's dismissed and Event.COMPLETE event is dispatched.
If text input 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 textInputDialog = TextInputDialog.new("my title", "my message", "some text", "Cancel", "OK")
local function onComplete(event)
print(event.text, event.buttonIndex, event.buttonText)
end
textInputDialog:addEventListener(Event.COMPLETE, onComplete)
textInputDialog:show()
MethodsTextInputDialog.new {{}} |
EventsConstantsTextInputDialog.EMAIL |