Difference between revisions of "TextInputDialog"

Line 26: Line 26:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/TextInputDialog.new|TextInputDialog.new]] <br/><!-- GIDEROSMTD:TextInputDialog.new(title,message,text,cancelButton,button1,button2) -->
+
[[Special:MyLanguage/TextInputDialog.new|TextInputDialog.new]] <br/>
[[Special:MyLanguage/TextInputDialog:getInputType|TextInputDialog:getInputType]] <br/><!-- GIDEROSMTD:TextInputDialog:getInputType() -->
+
<!-- GIDEROSMTD:TextInputDialog.new(title,message,text,cancelButton,button1,button2) -->
[[Special:MyLanguage/TextInputDialog:getText|TextInputDialog:getText]] <br/><!-- GIDEROSMTD:TextInputDialog:getText() -->
+
[[Special:MyLanguage/TextInputDialog:getInputType|TextInputDialog:getInputType]] <br/>
[[Special:MyLanguage/TextInputDialog:isSecureInput|TextInputDialog:isSecureInput]] <br/><!-- GIDEROSMTD:TextInputDialog:isSecureInput() -->
+
<!-- GIDEROSMTD:TextInputDialog:getInputType() -->
[[Special:MyLanguage/TextInputDialog:setInputType|TextInputDialog:setInputType]] <br/><!-- GIDEROSMTD:TextInputDialog:setInputType(type) -->
+
[[Special:MyLanguage/TextInputDialog:getText|TextInputDialog:getText]] <br/>
[[Special:MyLanguage/TextInputDialog:setSecureInput|TextInputDialog:setSecureInput]] <br/><!-- GIDEROSMTD:TextInputDialog:setSecureInput(secureInput) -->
+
<!-- GIDEROSMTD:TextInputDialog:getText() -->
[[Special:MyLanguage/TextInputDialog:setText|TextInputDialog:setText]] <br/><!-- GIDEROSMTD:TextInputDialog:setText(text) -->
+
[[Special:MyLanguage/TextInputDialog:isSecureInput|TextInputDialog:isSecureInput]] <br/>
 +
<!-- GIDEROSMTD:TextInputDialog:isSecureInput() -->
 +
[[Special:MyLanguage/TextInputDialog:setInputType|TextInputDialog:setInputType]] <br/>
 +
<!-- GIDEROSMTD:TextInputDialog:setInputType(type) -->
 +
[[Special:MyLanguage/TextInputDialog:setSecureInput|TextInputDialog:setSecureInput]] <br/>
 +
<!-- GIDEROSMTD:TextInputDialog:setSecureInput(secureInput) -->
 +
[[Special:MyLanguage/TextInputDialog:setText|TextInputDialog:setText]] <br/>
 +
<!-- GIDEROSMTD:TextInputDialog:setText(text) -->
  
 
| 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/><!-- GIDEROSEVT:Event.COMPLETE complete-->
+
<!--[[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/>-->
 +
[[Special:MyLanguage/TextInputDialog_Event.COMPLETE|TextInputDialog_Event.COMPLETE]]<br/>
 +
<!-- GIDEROSEVT:Event.COMPLETE complete-->
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
[[Special:MyLanguage/TextInputDialog.EMAIL|TextInputDialog.EMAIL]]<br/><!-- GIDEROSCST:TextInputDialog.EMAIL email-->
+
[[Special:MyLanguage/TextInputDialog.EMAIL|TextInputDialog.EMAIL]]<br/>
[[Special:MyLanguage/TextInputDialog.NUMBER|TextInputDialog.NUMBER]]<br/><!-- GIDEROSCST:TextInputDialog.NUMBER number-->
+
<!-- GIDEROSCST:TextInputDialog.EMAIL email-->
[[Special:MyLanguage/TextInputDialog.PHONE|TextInputDialog.PHONE]]<br/><!-- GIDEROSCST:TextInputDialog.PHONE phone-->
+
[[Special:MyLanguage/TextInputDialog.NUMBER|TextInputDialog.NUMBER]]<br/>
[[Special:MyLanguage/TextInputDialog.TEXT|TextInputDialog.TEXT]]<br/><!-- GIDEROSCST:TextInputDialog.TEXT text-->
+
<!-- GIDEROSCST:TextInputDialog.NUMBER number-->
[[Special:MyLanguage/TextInputDialog.URL|TextInputDialog.URL]]<br/><!-- GIDEROSCST:TextInputDialog.URL url-->
+
[[Special:MyLanguage/TextInputDialog.PHONE|TextInputDialog.PHONE]]<br/>
 +
<!-- GIDEROSCST:TextInputDialog.PHONE phone-->
 +
[[Special:MyLanguage/TextInputDialog.TEXT|TextInputDialog.TEXT]]<br/>
 +
<!-- GIDEROSCST:TextInputDialog.TEXT text-->
 +
[[Special:MyLanguage/TextInputDialog.URL|TextInputDialog.URL]]<br/>
 +
<!-- GIDEROSCST:TextInputDialog.URL url-->
 
|}
 
|}
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 20:45, 11 February 2020


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2012.8
Inherits from: AlertDialog

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 is 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

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()

Methods

TextInputDialog.new
TextInputDialog:getInputType
TextInputDialog:getText
TextInputDialog:isSecureInput
TextInputDialog:setInputType
TextInputDialog:setSecureInput
TextInputDialog:setText

Events

TextInputDialog_Event.COMPLETE

Constants

TextInputDialog.EMAIL
TextInputDialog.NUMBER
TextInputDialog.PHONE
TextInputDialog.TEXT
TextInputDialog.URL