(→Special attributes) |
(→Change displayed layout as parameter) |
||
Line 8: | Line 8: | ||
==Action signatures== | ==Action signatures== | ||
− | ===Change displayed layout as parameter=== | + | ===Change displayed layout as widget parameter=== |
;<code>gn:act_toLayoutSwipe="target"</code> | ;<code>gn:act_toLayoutSwipe="target"</code> |
Revision as of 10:54, 16 March 2017
gn:act_toLayoutSwipe
- Description
- Action used to change displayed root layout to desired target by swiping the widget.
- Action returns
- boolean
Action signatures
Change displayed layout as widget parameter
gn:act_toLayoutSwipe="target"
Parameter | Description |
---|---|
layout | target which will be displayed on the screen
Can be
|
Example
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:gn="http://schemas.ginstr.com/ginstr" android:id="@+id/page2" android:layout_width="match_parent" android:layout_height="match_parent" gn:act_toLayoutSwipe="@+id/page3" />
Special attributes
gn:disableSwipe
- if attribute exists on widget, a widget swipe will behave differently:
Attribute | Behaviour |
---|---|
left
|
Swipes with the finger from right to left will be ignored |
right
|
Swipes with the finger from left to right will be ignored |
invalid value | If attribute has an invalid value, a pop up a message will appear for the designer ("Invalid swipe restriction command") |
omitted | If attribute is omitted, swipes in either direction will work with no restrictions |