From wiki.ginstr.com
Jump to: navigation, search
(Update widget attribute)
Line 8: Line 8:
 
==Action signatures==
 
==Action signatures==
  
===Update widget attribute===
+
===Retrieve ginstr launcher setting===
  
:;<code>[gn:act_getLauncherSetting]|[target,sourceAttributeName,sourceValue]</code>
+
:;<code>[gn:act_getLauncherSetting]|[settingName, target]</code>
  
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Line 17: Line 17:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| <code>[[target]]{n}</code>
+
| <code>settingName</code>
 +
| keyword used to retrieve ginstr launcher setting value
 +
* Can be:
 +
** hardcoded
 +
|-
 +
| <code>[[target]]</code>
 
| [[target]] which will be shown
 
| [[target]] which will be shown
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** [[GnTimePicker]]
+
** [[DtText]]
** [[GnDateTimePicker]]
 
|-
 
| <code>[[source|sourceAttributeName]]{n}</code>
 
| [[source]] which will be used for attribute name
 
* Valid [[source]]:
 
** [[Datatypes#text|text]]
 
|-
 
| <code>[[source|sourceValue]]{n}</code>
 
| [[source]] which will be used for attribute value
 
* Valid [[source]]:
 
** [[Datatypes#status|status]]
 
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
:<code>@+id/progressReport20_serviceTimeStartInput</code> - widget which will be updated<br>
+
:<code>locale</code> - setting keyword<br>
:<code>@variable/attributeName</code> - attribute which will be updated<br>
+
:<code>@variable/newLocale</code> - target where the setting value will be stored<br>
:<code>@variable/is24HoursTime</code> - new value<br>
+
:; ⤷ <code>[gn:act_getLauncherSetting]|[locale, @variable/newLocale]</code>
:; ⤷ <code>[gn:act_updateWidgetAttribute]|[@+id/progressReport20_serviceTimeStartInput,@variable/attributeName,@variable/is24HoursTime]</code>
 
 
<hr>
 
<hr>
  

Revision as of 12:50, 11 February 2020

gn:act_getLauncherSetting

Description
Action that retrieves ginstr launcher setting.
Action returns
void

Action signatures

Retrieve ginstr launcher setting

[gn:act_getLauncherSetting]|[settingName, target]
Parameter Description
settingName keyword used to retrieve ginstr launcher setting value
  • Can be:
    • hardcoded
target target which will be shown

Example

locale - setting keyword
@variable/newLocale - target where the setting value will be stored
[gn:act_getLauncherSetting]|[locale, @variable/newLocale]

List of supported attributes

Widget Attribute name
GnTimePicker gn:is24HourFormat
GnDateTimePicker gn:is24HourFormat