(→Controlling Actions) |
m |
||
Line 8: | Line 8: | ||
;Description | ;Description | ||
: <code>[[GnChronometer]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/TextView.html TextView]</code> widget and is used to display time elapsed. | : <code>[[GnChronometer]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/TextView.html TextView]</code> widget and is used to display time elapsed. | ||
− | : It is controlled via actions <code>[[gn:act_startChrono]]</code>, <code>[[gn:act_stopChrono]]</code>, <code>[[gn:act_resetChrono]]</code>, <code>[[gn:act_setChrono]]</code>. | + | : It is controlled via actions <code>[[gn:act_startChrono]]</code>, <code>[[gn:act_stopChrono]]</code>, <code>[[gn:act_resetChrono]]</code>, <code>[[gn:act_setChrono]]</code> & <code>[[gn:act_setDateTimeFormat]]</code>. |
==XML Attributes Description== | ==XML Attributes Description== |
Revision as of 13:12, 12 July 2017
GnChronometer
- Widget XML tag
<com.ginstr.widgets.GnChronometer>
- Description
GnChronometer
inherits regular AndroidTextView
widget and is used to display time elapsed.- It is controlled via actions
gn:act_startChrono
,gn:act_stopChrono
,gn:act_resetChrono
,gn:act_setChrono
&gn:act_setDateTimeFormat
.
XML Attributes Description
Attribute | Description |
---|---|
gn:reverseMode
|
Forces widget to count time elapsed backward
Can be
|
gn:negativeValueTextColor
|
Represents color of text value when the value is less than 0
Can be
|
gn:setDateTimeFormat
|
Represents date/time format used to display the value
Can be
|
Controlling Actions
Action | Description |
---|---|
gn:act_startChrono
|
Starts the chronometer to measure time |
gn:act_stopChrono
|
Stops (pauses) the chronometer time measuring |
gn:act_resetChrono
|
Resets the chronometer time to 0
|
gn:act_setChrono
|
Sets chronometer to certain start time |
gn:act_setDateTimeFormat
|
Sets chronometer date/time format |
Example
<com.ginstr.widgets.GnChronometer android:id="@+id/waitingTime" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:background="#00000000" android:textColor="#000000" android:textSize="20sp" />