From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
 
Line 12: Line 12:
 
===Display a datetime dialog===
 
===Display a datetime dialog===
  
;<code>[gn:act_showDateTimeDialog]|[controlLayout;target]</code>
+
:;<code>[gn:act_showDateTimeDialog]|[controlLayout;target]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| controlLayout
+
| <code>controlLayout</code>
| xml file from controls dir which is used as dialog layout
+
| XML file from '''controls''' directory which is used as dialog layout
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] from where the datetime dialog will use default time value and where selected time from datetime dialog will be stored after the dialog is closed
 
| [[target]] from where the datetime dialog will use default time value and where selected time from datetime dialog will be stored after the dialog is closed
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** [[GnEditText]]
+
** <code>[[GnEditText]]</code>
** [[GnTextView]]
+
** <code>[[GnTextView]]</code>
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
<code>widget_en_datetime.xml</code> - external layout file<br>
+
:<code>widget_en_datetime.xml</code> - external layout file<br>
<code>@+id/targetWidget</code> - target<br><br>
+
:<code>@+id/targetWidget</code> - target<br>
<code>[gn:act_showDateTimeDialog]|[widget_en_datetime.xml;@+id/targetWidget]</code>
+
:; ⤷ <code>[gn:act_showDateTimeDialog]|[widget_en_datetime.xml;@+id/targetWidget]</code>
 
<hr>
 
<hr>

Latest revision as of 14:14, 12 July 2017

gn:act_showDateTimeDialog

Description
Action used to display a datetime dialog.
Action returns
void
Callback event

gn:act_showDateTimeDialogCallback - bound widget event; it will be fired after a datetime dialog is confirmed.

Action signatures

Display a datetime dialog

[gn:act_showDateTimeDialog]|[controlLayout;target]
Parameter Description
controlLayout XML file from controls directory which is used as dialog layout
target target from where the datetime dialog will use default time value and where selected time from datetime dialog will be stored after the dialog is closed

Example

widget_en_datetime.xml - external layout file
@+id/targetWidget - target
[gn:act_showDateTimeDialog]|[widget_en_datetime.xml;@+id/targetWidget]