From wiki.ginstr.com
Jump to: navigation, search
m
m (XML Attributes Description)
Line 21: Line 21:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_sourceType]]</code><span style="color:#FF0000">*</span>
+
| title="Attribute" | <code>[[#gn:s_sourceType|gn:s_sourceType]]</code><span style="color:#FF0000">*</span>
 
| title="Description" | Defines source type (keyboard input, NFC, QR, GPS, serial, time etc...)
 
| title="Description" | Defines source type (keyboard input, NFC, QR, GPS, serial, time etc...)
 
|-
 
|-
| title="Attribute" | <code>[[#gn:qrCameraRequired]]</code>
+
| title="Attribute" | <code>[[#gn:qrCameraRequired|gn:qrCameraRequired]]</code>
 
| title="Description" | Checks if camera is required
 
| title="Description" | Checks if camera is required
 
|-
 
|-
| title="Attribute" | <code>[[#gn:showAddress]]</code>
+
| title="Attribute" | <code>[[#gn:showAddress|gn:showAddress]]</code>
 
| title="Description" | Sets GPS data type displayed in <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets GPS data type displayed in <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:typeface]]</code>
+
| title="Attribute" | <code>[[#gn:typeface|gn:typeface]]</code>
 
| title="Description" | Sets font for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets font for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
Line 36: Line 36:
 
| title="Description" | Sets text into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets text into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_hint]]</code>
+
| title="Attribute" | <code>[[#gn:s_hint|gn:s_hint]]</code>
 
| title="Description" | Sets text hint into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets text hint into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:textStyle]]</code>
+
| title="Attribute" | <code>[[#gn:textStyle|gn:textStyle]]</code>
 
| title="Description" | Sets style for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets style for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
Line 45: Line 45:
 
| title="Description" | Sets background color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets background color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:textColor]]</code>
+
| title="Attribute" | <code>[[#gn:textColor|gn:textColor]]</code>
 
| title="Description" | Sets font color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets font color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:textSize]]</code>
+
| title="Attribute" | <code>[[#gn:textSize|gn:textSize]]</code>
 
| title="Description" | Sets font size for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets font size for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_nfcAlertType]]</code>
+
| title="Attribute" | <code>[[#gn:s_nfcAlertType|gn:s_nfcAlertType]]</code>
 
| title="Description" | Sets alert type when NFC is scanned
 
| title="Description" | Sets alert type when NFC is scanned
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_gravity]]</code>
+
| title="Attribute" | <code>[[#gn:s_gravity|gn:s_gravity]]</code>
 
| title="Description" | Sets the gravity of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> content, this means text alignment within widget
 
| title="Description" | Sets the gravity of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> content, this means text alignment within widget
 
|-
 
|-
| title="Attribute" | <code>[[#gn:minLines]]</code>
+
| title="Attribute" | <code>[[#gn:minLines|gn:minLines]]</code>
 
| title="Description" | Sets minimum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets minimum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:maxLines]]</code>
+
| title="Attribute" | <code>[[#gn:maxLines|gn:maxLines]]</code>
 
| title="Description" | Sets maximum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
| title="Description" | Sets maximum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:noServiceOnUpdate]]</code>
+
| title="Attribute" | <code>[[#gn:noServiceOnUpdate|gn:noServiceOnUpdate]]</code>
 
| title="Description" | Prevents content update if <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> contains some data
 
| title="Description" | Prevents content update if <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> contains some data
 
|-
 
|-
| title="Attribute" | <code>[[#gn:focusable]]</code>
+
| title="Attribute" | <code>[[#gn:focusable|gn:focusable]]</code>
 
| title="Description" | If present prevents user from focusing widget and entering data
 
| title="Description" | If present prevents user from focusing widget and entering data
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcRequired]]</code>
+
| title="Attribute" | <code>[[#gn:nfcRequired|gn:nfcRequired]]</code>
 
| title="Description" | Checks if NFC is required
 
| title="Description" | Checks if NFC is required
 
|-
 
|-
| title="Attribute" | <code>[[#gn:Visible]]</code>
+
| title="Attribute" | <code>[[#gn:Visible|gn:Visible]]</code>
 
| title="Description" | Shows or hides widget
 
| title="Description" | Shows or hides widget
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcReadingsInterval]]</code>
+
| title="Attribute" | <code>[[#gn:nfcReadingsInterval|gn:nfcReadingsInterval]]</code>
 
| title="Description" | Sets reading interval for NFC,  
 
| title="Description" | Sets reading interval for NFC,  
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcReadingIntervalForSameContent]]</code>
+
| title="Attribute" | <code>[[#gn:nfcReadingIntervalForSameContent|gn:nfcReadingIntervalForSameContent]]</code>
 
| title="Description" | Reading will be ignored and will only work if NFC with same id is read twice in a row within time defined by <code>[[#gn:nfcReadingsInterval]]</code>
 
| title="Description" | Reading will be ignored and will only work if NFC with same id is read twice in a row within time defined by <code>[[#gn:nfcReadingsInterval]]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcReadingGetAdditionalInfo]]</code>
+
| title="Attribute" | <code>[[#gn:nfcReadingGetAdditionalInfo|gn:nfcReadingGetAdditionalInfo]]</code>
 
| title="Description" | Returns additional information about tag
 
| title="Description" | Returns additional information about tag
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_nfcContentType]]</code>
+
| title="Attribute" | <code>[[#gn:s_nfcContentType|gn:s_nfcContentType]]</code>
 
| title="Description" | When NFC is read instead of the ID the embedded content of NFC tag is read
 
| title="Description" | When NFC is read instead of the ID the embedded content of NFC tag is read
 
|-
 
|-
| title="Attribute" | <code>[[#android:background]]</code>
+
| title="Attribute" | <code>[[#android:background|android:background]]</code>
 
| title="Description" | Sets the background image for the element
 
| title="Description" | Sets the background image for the element
 
|-
 
|-
| title="Attribute" | <code>[[#gn:inputType]]</code>
+
| title="Attribute" | <code>[[#gn:inputType|gn:inputType]]</code>
 
| title="Description" | Defines the input mode for the keyboard which appears on the screen
 
| title="Description" | Defines the input mode for the keyboard which appears on the screen
 
|-
 
|-
| title="Attribute" | <code>[[#android:textColorHint]]</code>
+
| title="Attribute" | <code>[[#android:textColorHint|android:textColorHint]]</code>
 
| title="Description" | Used to change the hint color when <code>[[#gn:s_hint]]</code> is set
 
| title="Description" | Used to change the hint color when <code>[[#gn:s_hint]]</code> is set
 
|-
 
|-
| title="Attribute" | <code>[[#gn:useEntry]]</code>
+
| title="Attribute" | <code>[[#gn:useEntry|gn:useEntry]]</code>
 
| title="Description" | Displays a button and entry field where a user can type “IMEI” and retrieve serial
 
| title="Description" | Displays a button and entry field where a user can type “IMEI” and retrieve serial
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcIntSequence]]</code>
+
| title="Attribute" | <code>[[#gn:nfcIntSequence|gn:nfcIntSequence]]</code>
 
| title="Description" | Defines internal sequence of processing NFC scans when more then one NFC widget on screen is receiving NFC scan event
 
| title="Description" | Defines internal sequence of processing NFC scans when more then one NFC widget on screen is receiving NFC scan event
 
|-
 
|-
| title="Attribute" | <code>[[#gn:isMasked]]</code>
+
| title="Attribute" | <code>[[#gn:isMasked|gn:isMasked]]</code>
 
| title="Description" | Masks the content of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> gets with password artefacts
 
| title="Description" | Masks the content of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> gets with password artefacts
 
|-
 
|-
| title="Attribute" | <code>[[#gn:decimalFormat]]</code>
+
| title="Attribute" | <code>[[#gn:decimalFormat|gn:decimalFormat]]</code>
 
| title="Description" | If <code>[[GnEditText]]</code> is target of calculation, set this attribute to change format of result
 
| title="Description" | If <code>[[GnEditText]]</code> is target of calculation, set this attribute to change format of result
 
|-
 
|-
| title="Attribute" | <code>[[#gn:paddingLeft]]</code>
+
| title="Attribute" | <code>[[#gn:paddingLeft|gn:paddingLeft]]</code>
 
| title="Description" | Defines internal space between text and left outer edge of the control
 
| title="Description" | Defines internal space between text and left outer edge of the control
 
|-
 
|-
| title="Attribute" | <code>[[#gn:paddingRight]]</code>
+
| title="Attribute" | <code>[[#gn:paddingRight|gn:paddingRight]]</code>
 
| title="Description" | Defines internal space between text and right outer edge of the control
 
| title="Description" | Defines internal space between text and right outer edge of the control
 
|-
 
|-
| title="Attribute" | <code>[[#gn:paddingBottom]]</code>
+
| title="Attribute" | <code>[[#gn:paddingBottom|gn:paddingBottom]]</code>
 
| title="Description" | Defines internal space between text and bottom outer edge of the control
 
| title="Description" | Defines internal space between text and bottom outer edge of the control
 
|-
 
|-
| title="Attribute" | <code>[[#gn:paddingTop]]</code>
+
| title="Attribute" | <code>[[#gn:paddingTop|gn:paddingTop]]</code>
 
| title="Description" | Defines internal space between text and top outer edge of the control
 
| title="Description" | Defines internal space between text and top outer edge of the control
 
|-
 
|-
| title="Attribute" | <code>[[#gn:nfcActionLostFocus]]</code>
+
| title="Attribute" | <code>[[#gn:nfcActionLostFocus|gn:nfcActionLostFocus]]</code>
 
| title="Description" | Triggers <code>[[gn:act_setOnNfc]]</code> when focus on <code>[[GnEditText]]</code> is lost
 
| title="Description" | Triggers <code>[[gn:act_setOnNfc]]</code> when focus on <code>[[GnEditText]]</code> is lost
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_customLayoutXml]]</code>
+
| title="Attribute" | <code>[[#gn:s_customLayoutXml|gn:s_customLayoutXml]]</code>
 
| title="Description" | Points to an XML file in '''“control”''' folder of ginstr app
 
| title="Description" | Points to an XML file in '''“control”''' folder of ginstr app
 
|-
 
|-
| title="Attribute" | <code>[[#gn:trimDecimalPlaces]]</code>
+
| title="Attribute" | <code>[[#gn:trimDecimalPlaces|gn:trimDecimalPlaces]]</code>
 
| title="Description" | Decimal value will be trimmed from widget when data is gathered from it
 
| title="Description" | Decimal value will be trimmed from widget when data is gathered from it
 
|-
 
|-
| title="Attribute" | <code>[[#gn:actionSetOnFocusLost]]</code>
+
| title="Attribute" | <code>[[#gn:actionSetOnFocusLost|gn:actionSetOnFocusLost]]</code>
 
| title="Description" | Activates on focus lost attribute triggering
 
| title="Description" | Activates on focus lost attribute triggering
 
|-
 
|-
| title="Attribute" | <code>[[#gn:setOnFocusLost ]]</code>
+
| title="Attribute" | <code>[[#gn:setOnFocusLost|gn:setOnFocusLost]]</code>
 
| title="Description" | Action set which executes once focus is lost on <code>[[GnEditText]]</code>
 
| title="Description" | Action set which executes once focus is lost on <code>[[GnEditText]]</code>
 
|-
 
|-
| title="Attribute" | <code>[[#gn:autoLoadTimestamp]]</code>
+
| title="Attribute" | <code>[[#gn:autoLoadTimestamp|gn:autoLoadTimestamp]]</code>
 
| title="Description" | Prevents autoloading timestamp  
 
| title="Description" | Prevents autoloading timestamp  
 
|-
 
|-
| title="Attribute" | <code>[[#gn:data_type ]]</code>
+
| title="Attribute" | <code>[[#gn:data_type|gn:data_type]]</code>
 
| title="Description" | Defines datatype of widget
 
| title="Description" | Defines datatype of widget
 
|-
 
|-
| title="Attribute" | <code>[[#gn:typingTimeInterval]]</code>
+
| title="Attribute" | <code>[[#gn:typingTimeInterval|gn:typingTimeInterval]]</code>
 
| title="Description" | Represents  number of seconds after <code>[[gn:act_setOnTypingEnd]]</code> will be executed
 
| title="Description" | Represents  number of seconds after <code>[[gn:act_setOnTypingEnd]]</code> will be executed
 
|-
 
|-
| title="Attribute" | <code>[[#gn:autoLoadLocation]]</code>
+
| title="Attribute" | <code>[[#gn:autoLoadLocation|gn:autoLoadLocation]]</code>
 
| title="Description" | Disables auto loading of GPS location when screen is loaded
 
| title="Description" | Disables auto loading of GPS location when screen is loaded
 
|-
 
|-
| title="Attribute" | <code>[[#gn:autoAdjustHeight]]</code>
+
| title="Attribute" | <code>[[#gn:autoAdjustHeight|gn:autoAdjustHeight]]</code>
 
| title="Description" | Changes behavior of input field
 
| title="Description" | Changes behavior of input field
 
|-
 
|-
| title="Attribute" | <code>[[#gn:gpsPrecision]]</code>
+
| title="Attribute" | <code>[[#gn:gpsPrecision|gn:gpsPrecision]]</code>
 
| title="Description" | Used in combination with <code>[[#gn:s_sourceType]]="gps"</code> and <code>if [[#gn:gpsPrecision]] = “true”</code> to ensure that only real gps data will be used
 
| title="Description" | Used in combination with <code>[[#gn:s_sourceType]]="gps"</code> and <code>if [[#gn:gpsPrecision]] = “true”</code> to ensure that only real gps data will be used
 
|}
 
|}

Revision as of 17:11, 28 June 2016

Inherited classes
View
Android class type
LinearLayout
Child elements
EditText, Button
Widget XML tag
<com.ginstr.widgets.GnEditText>


GnEditText is a multi-source EditText. It’s used to enter text data or acquire it from other sources.

Other sources are:

  • NFC
  • QR

XML Attributes Description

Note: An attribute marked with asterisk (*) is a mandatory parameter when creating widget.

Attribute Description
gn:s_sourceType* Defines source type (keyboard input, NFC, QR, GPS, serial, time etc...)
gn:qrCameraRequired Checks if camera is required
gn:showAddress Sets GPS data type displayed in EditText
gn:typeface Sets font for child EditText
#gn:s_text Sets text into EditText
gn:s_hint Sets text hint into EditText
gn:textStyle Sets style for child EditText
#gn:background Sets background color for child EditText
gn:textColor Sets font color for child EditText
gn:textSize Sets font size for child EditText
gn:s_nfcAlertType Sets alert type when NFC is scanned
gn:s_gravity Sets the gravity of EditText content, this means text alignment within widget
gn:minLines Sets minimum lines for EditText
gn:maxLines Sets maximum lines for EditText
gn:noServiceOnUpdate Prevents content update if EditText contains some data
gn:focusable If present prevents user from focusing widget and entering data
gn:nfcRequired Checks if NFC is required
gn:Visible Shows or hides widget
gn:nfcReadingsInterval Sets reading interval for NFC,
gn:nfcReadingIntervalForSameContent Reading will be ignored and will only work if NFC with same id is read twice in a row within time defined by #gn:nfcReadingsInterval
gn:nfcReadingGetAdditionalInfo Returns additional information about tag
gn:s_nfcContentType When NFC is read instead of the ID the embedded content of NFC tag is read
android:background Sets the background image for the element
gn:inputType Defines the input mode for the keyboard which appears on the screen
android:textColorHint Used to change the hint color when #gn:s_hint is set
gn:useEntry Displays a button and entry field where a user can type “IMEI” and retrieve serial
gn:nfcIntSequence Defines internal sequence of processing NFC scans when more then one NFC widget on screen is receiving NFC scan event
gn:isMasked Masks the content of EditText gets with password artefacts
gn:decimalFormat If GnEditText is target of calculation, set this attribute to change format of result
gn:paddingLeft Defines internal space between text and left outer edge of the control
gn:paddingRight Defines internal space between text and right outer edge of the control
gn:paddingBottom Defines internal space between text and bottom outer edge of the control
gn:paddingTop Defines internal space between text and top outer edge of the control
gn:nfcActionLostFocus Triggers gn:act_setOnNfc when focus on GnEditText is lost
gn:s_customLayoutXml Points to an XML file in “control” folder of ginstr app
gn:trimDecimalPlaces Decimal value will be trimmed from widget when data is gathered from it
gn:actionSetOnFocusLost Activates on focus lost attribute triggering
gn:setOnFocusLost Action set which executes once focus is lost on GnEditText
gn:autoLoadTimestamp Prevents autoloading timestamp
gn:data_type Defines datatype of widget
gn:typingTimeInterval Represents number of seconds after gn:act_setOnTypingEnd will be executed
gn:autoLoadLocation Disables auto loading of GPS location when screen is loaded
gn:autoAdjustHeight Changes behavior of input field
gn:gpsPrecision Used in combination with #gn:s_sourceType="gps" and if #gn:gpsPrecision = “true” to ensure that only real gps data will be used

Alternative layout

Alternative layout can be set into control folder. It can have any name ending with ".xml" and it must have valid XML structure.

It must contain two widgets with following ids:

EditText @+id/enEditText 
this represents input field for data
Button@+id/enEditTextButton 
this button is visible in certain configurations like when widget has gn:s_sourceType="qr"

The rest of the widgets and attributes in this XML structure can be defined as required, there are no constraints.

NFC scan modes

This option is only available on GnEditText when the widget has the mode set to “NFC”. NFC scan modes that are only relevant when there is more than one widget on screen that has gn:s_sourceType=“nfc“.

There are two modes of scanning available:

  1. Chain mode NFC scanning
  2. Focus mode NFC scanning

Chain mode NFC scanning

Chain mode scanning means that the widget can be set in a chain and scanned one after another without the need of a user to click into each widget every time a scan is performed.

Two attributes were added:

gn:nfcStartSequence 
once screen is loaded it defines the first widget into which data will be set after an NFC scan is performed and its value sets the target for the next scan
gn:nfcSequence 
every widget that is in the scanning chain but it’s not the starting widget should have this attribute to define the next target where data will be saved in next NFC scan
gn:typingTimeInterval 
represents a time from last GnEditText value change (in ms) after gn:act_setOnTypingEnd event will be raised
gn:act_setOnTypingEnd 
event raised after gn:typingTimeInterval is passed

i.e.<source lang="xml"><GnEditText

     android:id=“@+id/firstWidget“
     gn:nfcStartSequence=“@+id/secondWidget“ 
    .../>

<GnEditText

     android:id=“@+id/secondWidget“
     gn:nfcSequence=“@+id/firstWidget“ 
    .../>

</source>

Also notice in example that in gn:nfcSequence=“@+id/firstWidget“ is set. This is called circular chain of NFC scans, it means that when the last widget in the chain is scanned it will jump back to first widget on the screen. When a circular chain is made you do not need to reload screen to restart NFC scans.

If there is no circular chain once the last NFC tag in a chain is scanned and there is no next target every new scan will set data in the last widget in chain.

Focus mode NFC scanning

Once the screen is loaded if there is an NFC chain it is active. As soon as a widget is clicked on the chain is broken and only the focus mode scanning will work. This means that the widget in which the pointer is blinking (last tapped widget) will receive the results of the next NFC scan.

The only way to enable the chain scanning mode is to reload the screen where the chain exists.

imeOptions

imeOptions define keyboard functionality that will be valid when options are enabled upon that GnEditText.

To activate imeOptions on a GnEditText attribute “gn:imeOptions” has to be set.

There are four action types of imeOptions:

  1. actionGo
  2. actionSend
  3. actionNext
  4. actionDone

actionGo

When action go is set on GnEditText it is necessary to add another attribute “gn:imeActionGo”.

The imeActionGo defines target layout that will be opened by pressing the “enter/go” key on a virtual keyboard. i.e.<source lang="xml">gn:imeOptions="actionGo" gn:imeActionGo="@+id/targetRootLayout"</source>


actionSend

When action sent is set on GnEditText it is necessary to add another attribute to GnEditText “gn:imeActionSend”

actionSend defines action or action set that will get executed when the keyboard button enter/go is pressed. i.e.<source lang="xml">gn:imeOptions="actionSend" gn:imeActionSend="[action]|[action values],..."</source>

actionNext

When action next is set on GnEditText it is necessary to add another attribute to GnEditText “gn:imeActionNext”.

actionNext will take user to the next field that accepts text on pressing enter/go on keyboard. Options to navigate to the next fields are: FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_BACKWARD, FOCUS_FORWARD. i.e.<source lang="xml">gn:imeOptions="actionNext" gn:imeActionNext="FOCUS_DOWN"</source>

actionDone

actionDone will hide the keyboard when enter/go on virtual keyboard is pressed. i.e.<source lang="xml">gn:imeOptions=“actionDone”</source>

gn:s_sourceType

Defines source type

(String) values = input, NFC, QR, GPS, wifi, bt, serial

Value Description
input (default) Standard input via an on screen keyboard
NFC Input via a keyboard or by scanning a NFC tag. If there are multiple fields in same screen click on one to set active before scanning
QR Displays QR scan child button. Input via a keyboard or by selecting the button which will launch scanning application
GPS displays GPS location, there can be multiple GPS widgets on the same screen (related to attribute #gn:showAddress)
serial Displays serial number generated from IMEI. If attribute gn:useEntry is present then it will look for serial based on IMEI number provided in widget otherwise it will get IMEI from the device
time Displays current date time in milliseconds in widget
agversion Sets current ag version in the GnEditText on load of screen
aguser Sets current logged ag user into GnEditText widget on load of screen
wifi Displays WiFi fingerprint, there can be multiple WiFi fingerprint widgets on the same screen
gsm Displays GSM fingerprint, there can be multiple GSM fingerprint widgets on the same screen
bt Displays Bluetooth fingerprint, there can be multiple Bluetooth fingerprint widgets on the same screen

gn:qrCameraRequired

Checks if camera is required

(Boolean) values = true, false

Value Description
true (Relevant for QR sourceType) if device doesn’t have a camera it shows error dialog
false (Relevant for QR sourceType) it will check for camera and if none is present it will only disable child button for scan and leave option for manual entry

gn:showAddress

Sets GPS data type displayed in EditText

(Boolean) values = true, false

Value Description
true (Relevant for GPS sourceType) shows address of GPS location in EditText field
false (Relevant for GPS sourceType) shows coordinates of GPS location in EditText field

gn:typeface

Sets font for child EditText

(String) values = sans, serif, monospace

gn:s_text

Sets text into EditText

(String) values = text or @string/resourceId

gn:s_hint

Sets text hint into EditText

(String) values = text or @string/resourceId

gn:textStyle

Sets style for child EditText

(String) values = normal, bold, italic

gn:background

Sets background color for child EditText

(Hex) values i.e. = #000000 (hex color value)

gn:textColor

Sets font color for child EditText

(Hex) values i.e. = #000000 (hex color value)

gn:textSize

Sets font size for child EditText

(Dimension) value i.e. = 10dp or 10sp

gn:s_nfcAlertType

Sets alert type when NFC is scanned

Value Description
vibrate= Phone will vibrate with a NFC scan
sound Phone will play a sound with a NFC scan

gn:s_gravity

Sets the gravity of EditText content, this means text alignment within widget

(String) value i.e. = CENTER, CENTER_HORIZONTAL

gn:minLines

Sets minimum lines for EditText

(Integer) values i.e. = 1, 2, 4, ...

gn:maxLines

Sets maximum lines for EditText

(Integer) values i.e. = 1, 2, 4, ...

gn:noServiceOnUpdate

Prevents content update if EditText contains some data

values = none

gn:focusable

If present prevents user from focusing widget and entering data

Values = none

gn:nfcRequired

Checks if NFC is required

(Boolean) values = true, false

Value Description
true (Relevant for NFC sourceType) if not present it shows error dialog, if present but turned off shows dialog to open Android settings NFC screen
false (Relevant for NFC sourceType) does not check for NFC hardware

gn:Visible

Shows or hides widget

(Boolean) values = true, false

Value Description
true Displays widget. (NFC) click in control is necessary for NFC to work on this field
false Hides widget. (NFC) control gets autofocus for NFC,

IMPORTANT : there can be only one GnEditText on layout with this attribute false and sourceType nfc

gn:nfcReadingsInterval

Sets reading interval for NFC, if less time than defined has passed a message will be shown and reading ignored

(Integer) value = 1, 2, 5, …

If multiple widgets use NFC each one has its own individual timer

gn:nfcReadingIntervalForSameContent

Reading will be ignored and will only work if NFC with same id is read twice in a row within time defined by #gn:nfcReadingsInterval. If set to false then different id tags will produce same behaviour

(Boolean) values = true, false

gn:nfcReadingGetAdditionalInfo

Returns additional information about tag

gn:s_nfcContentType

When NFC is read instead of the ID the embedded content of NFC tag is read

(String) value = embedded

android:background

Sets the background image for the element

(String) value = @drawable/nameOfResource,

i.e. @drawable/imageOne the image resource has to be set inside of drawable folder (read more here)

gn:inputType

Defines the input mode for the keyboard which appears on the screen. For example setting the input type to number will display a numeric keyboard when user taps on this GnEditText.

Input types and combinations supported:

Input Type Description
TYPE_CLASS_NUMBER allows “0123456789” characters to be entered
TYPE_CLASS_NUMBER|TYPE_NUMBER_FLAG_SIGNED|TYPE_NUMBER_FLAG_DECIMAL allows "0123456789.,-" to be entered
TYPE_CLASS_NUMBER|TYPE_NUMBER_FLAG_SIGNED allows "0123456789-" to be entered
TYPE_NUMBER_FLAG_DECIMAL allows "0123456789.," to be entered
TYPE_CLASS_PHONE allows “0123456789+” and opens numerical keyboard

android:textColorHint

Used to change the hint color when #gn:s_hint is set

gn:useEntry

This attribute is only used when #gn:s_sourceType is set to serial. If this attribute is set the widget will display a button and entry field where a user can type “IMEI” and retrieve serial. If the field is omitted then only the entry field is displayed and the value is retrieve automatically for the current device

gn:nfcIntSequence

Defines internal sequence of processing NFC scans when more then one NFC widget on screen is receiving NFC scan event. This is an alternative to chain mode NFC scanning

gn:isMasked

When set the content of EditText gets masked with password artefacts

(Boolean) values = true, false

gn:decimalFormat

If GnEditText is target of calculation, set this attribute to change format of result. By default format is set to 0.00 which will show calculation result as i.e. 2.13, 121.67,… Please check format available on this link (under heading “Special Pattern Characters”).

gn:paddingLeft

If set, padding provides ability to define internal space between text and left outer edge of the control.

Use of measuring unit with value is obligatory

(String) value = 12dp, 1dp, etc...

gn:paddingRight

If set, padding provides ability to define internal space between text and right outer edge of the control.

Use of measuring unit with value is obligatory

(String) value = 12dp, 1dp, etc...

gn:paddingBottom

If set, padding provides ability to define internal space between text and bottom outer edge of the control.

Use of measuring unit with value is obligatory

(String) value = 12dp, 1dp, etc...

gn:paddingTop

If set, padding provides ability to define internal space between text and top outer edge of the control.

Use of measuring unit with value is obligatory

(String) value = 12dp, 1dp, etc...

gn:nfcActionLostFocus

If attribute is set to true it will trigger gn:act_setOnNfc when focus on GnEditText is lost

(Boolean) values = true, false

gn:s_customLayoutXml

If set it should point to an XML file in “control” folder of ginstr app

(String) : someXmlLayoutName.xml

More details in #Alternative layout

gn:trimDecimalPlaces

If attribute is true, decimal value will be trimmed from widget when data is gathered from it

(Boolean) value : true

gn:actionSetOnFocusLost

In order to activate on focus lost attribute triggering this attribute has to be set to true

(Boolean) value : true

gn:setOnFocusLost

Action set which executes once focus is lost on GnEditText

gn:autoLoadTimestamp

Prevents autoloading timestamp when widget with gn:s_sourceType=”time” is loaded on screen

(Boolean) value : false

gn:data_type

Defines datatype of widget

gn:typingTimeInterval

Represents number of seconds after gn:act_setOnTypingEnd will be executed

gn:autoLoadLocation

When set to falseand widget is set to type "GPS" it disables auto loading of GPS location when screen is loaded. In this case GPS information will have to be loaded from database or gn:act_reloadAutofilledWidgets will have to be called to resolve current location

gn:autoAdjustHeight

When set changes behaviour of input field. When input field has no content it is stretched to show entire hint text. As soon as text is entered into field height of field shrinks to size of inputted text,

(Boolean) value : true

gn:gpsPrecision

Used in combination with #gn:s_sourceType="gps" and if #gn:gpsPrecision = “true” to ensure that only real gps data will be used.