m |
(→Example) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<span STYLE="font-size: xx-large"><code>GnDateTimePicker</code></span> | <span STYLE="font-size: xx-large"><code>GnDateTimePicker</code></span> | ||
[[Category:Widget_Library]] | [[Category:Widget_Library]] | ||
− | |||
− | |||
− | |||
− | <code>[[GnDateTimePicker]]</code> provides date and time entry. | + | ;Widget XML tag |
+ | : <code><com.ginstr.widgets.GnDateTimePicker></code> | ||
+ | |||
+ | ;Description | ||
+ | : <code>[[GnDateTimePicker]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/LinearLayout.html LinearLayout]</code> widget. | ||
+ | : It provides date and time entry. | ||
+ | |||
+ | ==XML Attributes Description== | ||
+ | Note: An attribute marked with asterisk (<span style="color:#FF0000">*</span>) is a mandatory parameter when creating widget. | ||
+ | |||
+ | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
+ | |- | ||
+ | ! scope="col" | Attribute | ||
+ | ! scope="col" | Description | ||
+ | |- | ||
+ | | title="Attribute" | <code>gn:is24HourFormat</code> | ||
+ | | title="Description" | Sets whether this widget displays time in 24-hour mode or 12-hour mode with an AM/PM picker. | ||
+ | |||
+ | Can be | ||
+ | * <code>[[Datatypes#text|text]]</code> | ||
+ | * <code>[[Datatypes#status|status]]</code> | ||
+ | |- | ||
+ | | title="Attribute" | <code>gn:textColor</code>(M103.8.1) | ||
+ | | title="Description" | Defines widget's color | ||
+ | Can be | ||
+ | * <code>hardcoded</code> - hexadecimal color representation e.g. #000000 | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==Events== | ||
+ | : <code>[[gn:act_setClick]]</code> | ||
+ | : <code>[[gn:act_setLongClick]]</code> | ||
+ | : <code>[[gn:act_setOnDateTime]]</code> | ||
+ | |||
+ | ==Data types== | ||
+ | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
+ | |- | ||
+ | ! scope="col" | Input | ||
+ | |- | ||
+ | | title="Value" | <code>[[Datatypes#dateTime|dateTime]]</code> | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | ||
+ | |- | ||
+ | ! scope="col" | Output | ||
+ | |- | ||
+ | | title="Value" | <code>[[Datatypes#dateTime|dateTime]]</code> | ||
+ | |} | ||
+ | |||
+ | |||
+ | ==Example== | ||
+ | <syntaxhighlight code="xml"> | ||
+ | <com.ginstr.widgets.GnDateTimePicker | ||
+ | android:id="@+id/laundryServiceReport_dateAndTimeReceived" | ||
+ | android:layout_width="match_parent" | ||
+ | android:layout_height="wrap_content" | ||
+ | gn:textColor="#000000" /> | ||
+ | </syntaxhighlight> |
Latest revision as of 23:57, 24 March 2020
GnDateTimePicker
- Widget XML tag
<com.ginstr.widgets.GnDateTimePicker>
- Description
GnDateTimePicker
inherits regular AndroidLinearLayout
widget.- It provides date and time entry.
XML Attributes Description
Note: An attribute marked with asterisk (*) is a mandatory parameter when creating widget.
Attribute | Description |
---|---|
gn:is24HourFormat
|
Sets whether this widget displays time in 24-hour mode or 12-hour mode with an AM/PM picker.
Can be |
gn:textColor (M103.8.1)
|
Defines widget's color
Can be
|
Events
Data types
Input |
---|
dateTime
|
Output |
---|
dateTime
|
Example
<com.ginstr.widgets.GnDateTimePicker android:id="@+id/laundryServiceReport_dateAndTimeReceived" android:layout_width="match_parent" android:layout_height="wrap_content" gn:textColor="#000000" />