(→GENERAL) |
(→GENERAL) |
||
Line 31: | Line 31: | ||
<initial>${startingValue}</initial> | <initial>${startingValue}</initial> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | * "step", default value <code>1</code>. Defines the increase factor <code>${increment}</code>, column in configuration.xml should have setting: | + | * "step value", default value <code>1</code>. Defines the increase factor <code>${increment}</code>, column in configuration.xml should have setting: |
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<delta>${increment}</delta> | <delta>${increment}</delta> |
Latest revision as of 07:52, 31 March 2020
Counter
Widget is used to show a counter number. Value will be stored in couchdb as datatype Counter
.
Widget id, ${gbamID}
:
numberCounter
Back to GBAM widgets table
Datatypes
Value is stored from widget to database as counter
datatype.
Predefined user data
PreLoaded
Properties panel
User will configure this data in properties panels of selected widget:
GENERAL
- "database column headline",
${widgetLabel}
- "starting value", default value
1
. Defines increment starting number${startingValue}
, column in configuration.xml should have setting:
<initial>${startingValue}</initial>
- "step value", default value
1
. Defines the increase factor${increment}
, column in configuration.xml should have setting:
<delta>${increment}</delta>
VALIDATIONS
- -
internal validators
- -
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":
- "align counter", radio button options with values: "left", "middle", "right", add to configuration.xml:
<columnCounter> <horizontalAlignment>left|center|right</horizontalAlignment> </columnCounter>
- "initial", initial counter value, add to configuration.xml:
<columnCounter> <initial>1</initial> </columnCounter>
- "delta", the increment amount. Should be more than 0. Add to configuration.xml:
<columnCounter> <delta>1</delta> </columnCounter>
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.GnEditText android:id="@+id/${widgetID}_input" android:layout_width="match_parent" android:layout_height="wrap_content" gn:s_sourceType="input" gn:dataType="counter" gn:visible="false"/>