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

Signature

Widget is represented by a button. When button is clicked new screen is opened where signature can be captured.

Widget id, ${gbamID}:

signature

Back to GBAM widgets table

Datatypes

Value is stored from widget to database as signature datatype.

Predefined user data

PreLoaded

Properties panel

User will configure this data in properties panels of selected widget:

GENERAL
VALIDATIONS
    <columnSignature required="true|false"></columnSignature>
ACTION
  • -
ACTION MESSAGES
  • -
DATABASE
  • "is part of database", checkbox option by default is set as checked. When checked database column is created for this widget.
  • "additional ginstr web column settings":
  • "replicate", if true, replicates audios from server to android client, add to configuration.xml:
<columnSignature>
    <replicate>true|false</replicate>
</columnSignature>

Code snippets

GBAM Code Variables

Variables which are used in code snippet below but not defined in user modifiable inputs.

Common widget code

<com.ginstr.widgets.GnCaptureSignature
	android:id="@+id/${widgetID}_button"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:text="@string/${widgetID}"
	gn:act_setAfterSignatureTaken="[gn:act_copyData]|[@+id/${widgetID}_button,@+id/${widgetID}_gallery]"
        gn:dataType="signature"
        gn:style="@style/signature_button" />

<LinearLayout
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	gn:style="@style/signature_galleryContainer">

	<com.ginstr.widgets.GnMediaGallery
		android:id="@+id/${widgetID}_gallery"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
                gn:style="@style/signature_gallery" />

</LinearLayout>

strings.xml

Lines to be added for each language.

<string name="${widgetID}">${widgetLabel}</string>