From wiki.ginstr.com
Jump to: navigation, search

gn:act_toLayoutClick

Description
Action used to change displayed root layout to desired target.
Each time this action is executed, it adds the new layout to the layout stack.
Action returns
boolean

Action signatures

Change displayed layout as action

[gn:act_toLayoutClick]|[layout,skipStack]
Parameter Description
layout target which will be displayed on the screen

Can be

  • hardcoded id of target root layout
  • GnDropDown which has "local" datasource from @array/someArray with @array/someArray_value,
someArray_value should contain id’s of root layouts for screens without @+id/prefix
(this can be used on i.e. gn:act_setItemSelect of dropdown when value is changed to go to different screen or in other scenarios)
skipStack (optional) if "skipStack" is set the target that we are opening will not be added to stack of screens. Stack represents collection of screens we passed trough. This means if we go to target with "skipStack" option and then we go from target screen to next screen and press back we will skip the target screen and return to first screen which IS on the stack.

Example

@+id/screen1 - layout
[gn:act_toLayoutClick]|[@+id/screen1]
[gn:act_toLayoutClick]|[@+id/screen1,skipStack]

Change displayed layout as widget parameter

gn:act_toLayoutClick="target"
Parameter Description
layout target which will be displayed on the screen

Can be

  • hardcoded id of target root layout
  • GnDropDown which has "local" datasource from @array/someArray with @array/someArray_value,
someArray_value should contain id’s of root layouts for screens without @+id/prefix
(this can be used on i.e. gn:act_setItemSelect of dropdown when value is changed to go to different screen or in other scenarios)

Example

<Button
  android:id="@+id/btnMenuNewObject"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:text="@string/btnMenuNewObject"
  gn:act_toLayoutClick="@+id/add_new_object" />