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

gn:callWidgetEvent

Description
Action used to call internal widget event if such event is available. This provides flexibility to ginstr app developer to trigger internal events when needed in action sequence execution or on via alternative widgets instead of just using predefined behavior which also gives layout flexibility.
i.e. calling internal event of saving signature for widget GnSignatureEmbedded via button located on bottom of screen while other two can be located at the top (clear, and cancel)
Action returns
void

Action signatures

[gn:callWidgetEvent]|[target, event]
Parameter Description
target target target on which internal event will get called
event event which will triggered on target.

Example

screen.xml
<com.ginstr.widgets.GnCaptureSignatureEmbedded
    android:id="@+id/embeddedSignature"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    gn:backgroundColor="TRANSPARENT"
    gn:strokeColor="#3974d3"
    gn:signatureCaptureWidgetId="@+id/signatureBox"
    gn:controlPaddingWidgetId="@+id/controlsBox"
    gn:disableInternalEvents="clear"/>

<FrameLayout
    android:id="@+id/exampleFrame"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:visibility="gone"
    gn:act_set="[gn:callWidgetEvent]|[@+id/embeddedSignature,clear]" />