From wiki.ginstr.com
Jump to: navigation, search
Line 1: Line 1:
{|align=right   
+
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
|__TOC__
+
[[Category:Widgets]]
 +
;Inherited classes: [http://developer.android.com/reference/android/view/View.html View]
 +
;Android class type: [http://developer.android.com/reference/android/widget/LinearLayout.html LinearLayout]
 +
;Child elements: <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>, <code>[http://developer.android.com/reference/android/widget/Button.html Button]</code>
 +
;Widget XML tag: <code><com.ginstr.widgets.GnEditText></code>
 +
 
 +
 
 +
<code>[[GnEditText]]</code> is a multi-source <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>. It’s used to enter text data or acquire it from other sources.
 +
 
 +
Other sources are:
 +
*NFC
 +
*QR
 +
 
 +
==Layout Configuration==
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Attribute
 +
! scope="col" | Description
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_sourceType]]</code><span style="color:#FF0000">*</span>
 +
| title="Description" | Defines source type (keyboard input, NFC, QR, GPS, serial, time etc...)
 +
|-
 +
| title="Attribute" | <code>[[#gn:qrCameraRequired]]</code>
 +
| title="Description" | Checks if camera is required
 +
|-
 +
| title="Attribute" | <code>[[#gn:showAddress]]</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="Description" | Sets font for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_text]]</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="Description" | Sets text hint into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
|-
 +
| title="Attribute" | <code>[[#gntextstyle]]</code>
 +
| title="Description" | Sets style for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
|-
 +
| title="Attribute" | <code>[[#gn:background]]</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="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="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="Description" | Sets alert type when NFC is scanned
 +
|-
 +
| title="Attribute" | <code>[[#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="Attribute" | <code>[[#gn:minLines]]</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="Description" | Sets maximum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
|-
 +
| title="Attribute" | <code>[[#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="Attribute" | <code>[[#gn:focusable]]</code>
 +
| title="Description" | If present prevents user from focusing widget and entering data
 +
|-
 +
| title="Attribute" | <code>[[#gn:nfcRequired]]</code>
 +
| title="Description" | Checks if NFC is required
 +
|-
 +
| title="Attribute" | <code>[[#gn:Visible]]</code>
 +
| title="Description" | Shows or hides widget
 +
|-
 +
| title="Attribute" | <code>[[#gn:nfcReadingsInterval]]</code>
 +
| title="Description" | Sets reading interval for NFC,
 +
|-
 +
| title="Attribute" | <code>[[#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="Attribute" | <code>[[#gn:nfcReadingGetAdditionalInfo]]</code>
 +
| title="Description" | Returns additional information about tag
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_nfcContentType]]</code>
 +
| 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="Description" | Sets the background image for the element
 +
|-
 +
| title="Attribute" | <code>[[#gn:inputType]]</code>
 +
| title="Description" | Defines the input mode for the keyboard which appears on the screen
 +
|-
 +
| title="Attribute" | <code>[[#android:textColorHint]]</code>
 +
| title="Description" | Used to change the hint color when <code>[[#gn:s_hint]]</code> is set
 +
|-
 +
| title="Attribute" | <code>[[#gn:useEntry]]</code>
 +
| title="Description" | Displays a button and entry field where a user can type “IMEI” and retrieve serial
 +
|-
 +
| title="Attribute" | <code>[[#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="Attribute" | <code>[[#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="Attribute" | <code>[[#gn:decimalFormat]]</code>
 +
| 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="Description" | Defines internal space between text and left outer edge of the control
 +
|-
 +
| title="Attribute" | <code>[[#gn:paddingRight]]</code>
 +
| title="Description" | Defines internal space between text and right outer edge of the control
 +
|-
 +
| title="Attribute" | <code>[[#gn:paddingBottom]]</code>
 +
| title="Description" | Defines internal space between text and bottom outer edge of the control
 +
|-
 +
| title="Attribute" | <code>[[#gn:paddingTop]]</code>
 +
| title="Description" | Defines internal space between text and top outer edge of the control
 +
|-
 +
| title="Attribute" | <code>[[#gn:nfcActionLostFocus]]</code>
 +
| title="Description" | Triggers <code>[[gn:act_setOnNfc]]</code> when focus on <code>[[GnEditText]]</code> is lost
 +
|-
 +
| title="Attribute" | <code>[[#gn:s_customLayoutXml]]</code>
 +
| title="Description" | Points to an XML file in '''“control”''' folder of ginstr app
 +
|-
 +
| title="Attribute" | <code>[[#gn:trimDecimalPlaces]]</code>
 +
| title="Description" | Decimal value will be trimmed from widget when data is gathered from it
 +
|-
 +
| title="Attribute" | <code>[[#gn:actionSetOnFocusLost]]</code>
 +
| title="Description" | Activates on focus lost attribute triggering
 +
|-
 +
| title="Attribute" | <code>[[#gn:setOnFocusLost ]]</code>
 +
| title="Description" | Action set which executes once focus is lost on <code>[[GnEditText]]</code>
 +
|-
 +
| title="Attribute" | <code>[[#gn:autoLoadTimestamp]]</code>
 +
| title="Description" | Prevents autoloading timestamp
 +
|-
 +
| title="Attribute" | <code>[[#gn:data_type ]]</code>
 +
| title="Description" | Defines datatype of widget
 +
|-
 +
| title="Attribute" | <code>[[#gn:typingTimeInterval]]</code>
 +
| title="Description" | Represents number of seconds after <code>[[gn:act_setOnTypingEnd]]</code> will be executed
 +
|-
 +
| title="Attribute" | <code>[[#gn:autoLoadLocation]]</code>
 +
| title="Description" | Disables auto loading of GPS location when screen is loaded
 +
|-
 +
| title="Attribute" | <code>[[#gn:autoAdjustHeight]]</code>
 +
| title="Description" | Changes behavior of input field
 +
|-
 +
| title="Attribute" | <code>[[#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
 
|}
 
|}
  
NOT DONE , TO BE REFACTORED BY DANIJEL !!!
+
===gn:s_sourceType===
  
==Widget internal composition==
+
Defines source type
Internal elements of the widget which may be other tier 1 or tier 2 widgets
 
* none
 
  
==Attributes configuration==
+
''(String)'' values = <code>input</code>, <code>NFC</code>, <code>QR</code>, <code>GPS</code>, <code>wifi</code>, <code>bt</code>, <code>serial</code>
  
Preset attributes
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
! scope="col" | Attribute
 
 
! scope="col" | Value
 
! scope="col" | Value
 +
! scope="col" | Description
 +
|-
 +
| title="Value" | <code>input</code> (default)
 +
| title="Description" | Standard input via an on screen keyboard
 +
|-
 +
| title="Value" | <code>NFC</code>
 +
| title="Description" | 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
 +
|-
 +
| title="Value" | <code>QR</code>
 +
| title="Description" | Displays QR scan child button. Input via a keyboard or by selecting the button which will launch scanning application
 +
|-
 +
| title="Value" | <code>GPS</code>
 +
| title="Description" | displays GPS location, there can be multiple GPS widgets on the same screen (related to attribute <code>[[#gn:showAddress]]</code>)
 +
|-
 +
| title="Value" | <code>serial</code>
 +
| title="Description" | Displays serial number generated from IMEI. If attribute <code>[[gn:useEntry]]</code> is present then it will look for serial based on IMEI number provided in widget otherwise it will get IMEI from the device
 +
|-
 +
| title="Value" | <code>time</code>
 +
| title="Description" | Displays current date time in milliseconds in widget
 +
|-
 +
| title="Value" | <code>agversion</code>
 +
| title="Description" | Sets current ag version in the <code>GnEditText</code> on load of screen
 +
|-
 +
| title="Value" | <code>aguser</code>
 +
| title="Description" | Sets current logged ag user into <code>GnEditText</code> widget on load of screen
 +
|-
 +
| title="Value" | <code>wifi</code>
 +
| title="Description" | Displays WiFi fingerprint, there can be multiple WiFi fingerprint widgets on the same screen
 +
|-
 +
| title="Value" | <code>gsm</code>
 +
| title="Description" | Displays GSM fingerprint, there can be multiple GSM fingerprint widgets on the same screen
 +
|-
 +
| title="Value" | <code>bt</code>
 +
| title="Description" | Displays Bluetooth fingerprint, there can be multiple Bluetooth fingerprint widgets on the same screen
 +
|}
 +
 +
===gn:qrCameraRequired===
 +
Checks if camera is required
 +
 +
''(Boolean)'' values = <code>true</code>, <code>false</code>
 +
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Value
 +
! scope="col" | Description
 +
|-
 +
| title="Value" | <code>true</code>=
 +
| title="Description" | (Relevant for QR sourceType) if device doesn’t have a camera it shows error dialog
 +
|-
 +
| title="Value" | <code>false</code>
 +
| title="Description" | (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 <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(Boolean)'' values = <code>true</code>, <code>false</code>
 +
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Value
 +
! scope="col" | Description
 +
|-
 +
| title="Value" | <code>true</code>=
 +
| title="Description" | (Relevant for GPS sourceType) shows address of GPS location in <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> field
 +
|-
 +
| title="Value" | <code>false</code>
 +
| title="Description" | (Relevant for GPS sourceType) shows coordinates of GPS location in <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> field
 +
|}
 +
 +
===gn:typeface===
 +
Sets font for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(String)'' values = <code>sans</code>, <code>serif</code>, <code>monospace</code>
 +
 +
===gn:s_text===
 +
Sets text into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(String)'' values = <code>text</code> or <code>@string/resourceId</code>
 +
 +
===gn:s_hint===
 +
Sets text hint into <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(String)'' values = <code>text</code> or <code>@string/resourceId</code>
 +
 +
===gntextstyle===
 +
Sets style for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(String)'' values = <code>normal</code>, <code>bold</code>, <code>italic</code>
 +
 +
===gn:background===
 +
Sets background color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(Hex)'' values i.e. = <code>#000000</code> (hex color value)
 +
 +
===gn:textColor===
 +
Sets font color for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(Hex)'' values i.e. = <code>#000000</code> (hex color value)
 +
 +
===gn:textsize===
 +
Sets font size for child <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 +
''(Dimension)'' value i.e. = <code>10dp</code> or <code>10sp</code>
 +
 +
===gn:s_nfcAlertType===
 +
Sets alert type when NFC is scanned
 +
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Value
 +
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | android:id
+
| title="Value" | <code>vibrate</code>=
| title="Value" | @+id/gnEditText1
+
| title="Description" | Phone will vibrate with a NFC scan
 
|-
 
|-
| title="Attribute" | android:layout_width
+
| title="Value" | <code>sound</code>
| title="Value" | match_parent
+
| title="Description" | Phone will play a sound with a NFC scan
 +
|}
 +
 
 +
===gn:s_gravity===
 +
Sets the gravity of <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> content, this means text alignment within widget
 +
 
 +
''(String)'' value i.e. = <code>CENTER</code>, <code>CENTER_HORIZONTAL</code>
 +
 
 +
===gn:minLines===
 +
Sets minimum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 
 +
''(Integer)'' values i.e. = <code>1</code>, <code>2</code>, <code>4</code>, ...
 +
 
 +
===gn:maxLines===
 +
| title="Description" | Sets maximum lines for <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code>
 +
 
 +
''(Integer)'' values i.e. = <code>1</code>, <code>2</code>, <code>4</code>, ...
 +
 
 +
===gn:noServiceOnUpdate===
 +
| title="Description" | Prevents content update if <code>[http://developer.android.com/reference/android/widget/EditText.html EditText]</code> contains some data
 +
 
 +
values = <code>none</code>
 +
 
 +
===gn:focusable===
 +
If present prevents user from focusing widget and entering data
 +
 
 +
values = <code>none</code>
 +
 
 +
===gn:nfcRequired===
 +
Checks if NFC is required
 +
 
 +
''(Boolean)'' values = <code>true</code>, <code>false</code>
 +
 
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Value
 +
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | android:layout_height
+
| title="Value" | <code>true</code>=
| title="Value" | wrap_content
+
| title="Description" | (Relevant for NFC sourceType) if not present it shows error dialog, if present but turned off shows dialog to open Android settings NFC screen
 
|-
 
|-
| title="Attribute" | ek:s_sourceType
+
| title="Value" | <code>false</code>
| title="Value" | input
+
| title="Description" | (Relevant for NFC sourceType) does not check for NFC hardware
 
|}
 
|}
  
User defined attributes
+
===gn:Visible===
 +
Shows or hides widget
 +
 
 +
''(Boolean)'' values = <code>true</code>, <code>false</code>
 +
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
! scope="col" | Attribute
 
 
! scope="col" | Value
 
! scope="col" | Value
 +
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | ek:data_request
+
| title="Value" | <code>true</code>=
| title="Value" | ''user provided''
+
| title="Description" | Displays widget. (NFC) click in control is necessary for NFC to work on this field
 
|-
 
|-
| title="Attribute" | ek:data_field
+
| title="Value" | <code>false</code>
| title="Value" | ''user provided''
+
| title="Description" | Hides widget. (NFC) control gets autofocus for NFC,
 +
IMPORTANT : there can be only one <code>[[GnEditText]]</code> on layout with this attribute <code>false</code> and <code>sourceType nfc</code>
 
|}
 
|}
  
==Code snippets==
+
===gn:nfcReadingsInterval===
Widget code:
+
Sets reading interval for NFC, if less time than defined has passed a message will be shown and reading ignored
 +
 
 +
''(Integer)'' value = <code>1</code>, <code>2</code>, <code>5</code>, …
 +
 
 +
If multiple widget 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 <code>[[#gn:nfcReadingsInterval]]</code>. If set to <code>false</code> then different id tags will produce same behaviour
 +
 
 +
(Boolean) values = <code>true</code>, <code>false</code>
 +
 
 +
===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
  
<source lang="xml">
+
''(String)'' value = <code>embedded</code>
<com.ginstr.widgets.GnEditText
 
    android:id="@+id/gnEditText1"
 
    android:layout_width="match_parent"
 
    android:layout_height="wrap_content"
 
    ek:s_sourceType="input" />
 
</source>
 

Revision as of 18:03, 23 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

Layout Configuration

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
#gntextstyle 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

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

gntextstyle

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

| title="Description" | Sets maximum lines for EditText

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

gn:noServiceOnUpdate

| title="Description" | 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 widget 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