m (formatting) |
|||
Line 10: | Line 10: | ||
===Show cancelable single choice dialog=== | ===Show cancelable single choice dialog=== | ||
− | ;<code>[gn:act_showSingleChoiceDialog]|[title,message,okButtonText,target,targetEvent,cancelable]</code> | + | :;<code>[gn:act_showSingleChoiceDialog]|[title, message, okButtonText, target, targetEvent, cancelable]</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 | ||
|- | |- | ||
− | | title | + | | <code>title</code> |
| [[source]] from where the dialog title will be used | | [[source]] from where the dialog title will be used | ||
* Valid [[source|sources]]: | * Valid [[source|sources]]: | ||
** any [[source]] | ** any [[source]] | ||
|- | |- | ||
− | | message | + | | <code>message</code> |
| [[source]] from where the dialog message will be used | | [[source]] from where the dialog message will be used | ||
* Valid [[source|sources]]: | * Valid [[source|sources]]: | ||
** any [[source]] | ** any [[source]] | ||
|- | |- | ||
− | | okButtonText | + | | <code>okButtonText</code> |
| [[source]] from where the dialog ok button text will be used | | [[source]] from where the dialog ok button text will be used | ||
* Valid [[source|sources]]: | * Valid [[source|sources]]: | ||
** any [[source]] | ** any [[source]] | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
− | | name of [[target]] where [[:Category:Events|targetEvent]] will be fired after user clicks on the | + | | name of [[target]] where [[:Category:Events|targetEvent]] will be fired after user clicks on the OK button |
|- | |- | ||
− | | targetEvent | + | | <code>targetEvent</code> |
− | | name of | + | | name of event on [[target]] which will be fired after user clicks on the OK button |
|- | |- | ||
− | | cancelable | + | | <code>cancelable</code> |
− | | <div style="text-align: right;">'''optional'''</div> | + | | <div style="text-align: right; background-color: #e5e5e5; padding-right: 7px">'''optional'''</div> |
if set to <code>false</code>, dialog will not be cancelable by pressing anywhere on screen, only by pressing OK button | if set to <code>false</code>, dialog will not be cancelable by pressing anywhere on screen, only by pressing OK button | ||
|- | |- | ||
Line 45: | Line 45: | ||
====Example==== | ====Example==== | ||
− | <code>@string/screen2_dialogDifferentNfcTagTitle</code> - title<br> | + | :<code>@string/screen2_dialogDifferentNfcTagTitle</code> - title<br> |
− | <code>@string/screen2_dialogDifferentNfcTagMessage</code> - message<br> | + | :<code>@string/screen2_dialogDifferentNfcTagMessage</code> - message<br> |
− | <code>@string/screen2_dialogDifferentNfcTagOk</code> - okButtonText<br> | + | :<code>@string/screen2_dialogDifferentNfcTagOk</code> - okButtonText<br> |
− | <code>@+id/targetWidgetId</code> - target<br> | + | :<code>@+id/targetWidgetId</code> - target<br> |
− | <code>gn:act_usedAction</code> - targetEvent<br> | + | :<code>gn:act_usedAction</code> - targetEvent<br> |
− | <code>true</code> - is cancelable | + | :<code>true</code> - is cancelable<br> |
− | <code>[gn:act_showSingleChoiceDialog]|[@string/screen2_dialogDifferentNfcTagTitle,@string/screen2_dialogDifferentNfcTagMessage,@string/screen2_dialogDifferentNfcTagOk,@+id/targetWidgetId,gn:act_usedAction,true]</code> | + | :; ⤷ <code>[gn:act_showSingleChoiceDialog]|[@string/screen2_dialogDifferentNfcTagTitle,@string/screen2_dialogDifferentNfcTagMessage,@string/screen2_dialogDifferentNfcTagOk,@+id/targetWidgetId,gn:act_usedAction,true]</code> |
<hr> | <hr> |
Revision as of 15:00, 12 July 2017
gn:act_showSingleChoiceDialog
- Description
- Action used to display a single choice dialog.
- Action returns
- void
Action signatures
Show cancelable single choice dialog
[gn:act_showSingleChoiceDialog]|[title, message, okButtonText, target, targetEvent, cancelable]
Parameter Description title
source from where the dialog title will be used message
source from where the dialog message will be used okButtonText
source from where the dialog ok button text will be used target
name of target where targetEvent will be fired after user clicks on the OK button targetEvent
name of event on target which will be fired after user clicks on the OK button cancelable
optionalif set to
false
, dialog will not be cancelable by pressing anywhere on screen, only by pressing OK button
Example
@string/screen2_dialogDifferentNfcTagTitle
- title@string/screen2_dialogDifferentNfcTagMessage
- message@string/screen2_dialogDifferentNfcTagOk
- okButtonText@+id/targetWidgetId
- targetgn:act_usedAction
- targetEventtrue
- is cancelable
- ⤷
[gn:act_showSingleChoiceDialog]|[@string/screen2_dialogDifferentNfcTagTitle,@string/screen2_dialogDifferentNfcTagMessage,@string/screen2_dialogDifferentNfcTagOk,@+id/targetWidgetId,gn:act_usedAction,true]
- ⤷