From wiki.ginstr.com
Jump to: navigation, search
Line 16: Line 16:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_minDate|gn:s_minDate]]</code>
+
| title="Attribute" | gn:dataType
 +
| title="Description" | represents widget data type
 +
Can be
 +
* [[Datatypes#dateTime|dateTime]]
 +
* [[Datatypes#date|date]]
 +
|-
 +
| title="Attribute" | gn:s_minDate
 
| title="Description" | Sets minimum permitted date
 
| title="Description" | Sets minimum permitted date
 
Can be
 
Can be
Line 23: Line 29:
 
* <code>plusX</code> - Sets minimum date as current date plus <code>X</code> days
 
* <code>plusX</code> - Sets minimum date as current date plus <code>X</code> days
 
|-
 
|-
| title="Attribute" | <code>[[#gn:s_maxDate|gn:s_maxDate]]</code>
+
| title="Attribute" | gn:s_maxDate
 
| title="Description" | Sets maximum permitted date
 
| title="Description" | Sets maximum permitted date
 
Can be
 
Can be
Line 40: Line 46:
 
   gn:dataType="date" />  
 
   gn:dataType="date" />  
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
 
 
 
 
 
 
 
<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div>
 
<span STYLE="font-size: xx-large"><code>GnDatePicker</code></span>
 
[[Category:Widget_Library]]
 
;Inherited classes: <code>[http://developer.android.com/reference/android/view/View.html View]</code>
 
;Android class type: <code>[http://developer.android.com/reference/android/widget/DatePicker.html DatePicker]</code>
 
;Widget XML tag: <code><com.ginstr.widgets.GnDatePicker></code>
 
 
 
<code>[[GnDatePicker]]</code> provides date entry.
 
 
If layout configuration options below are not required, <code>[http://developer.android.com/reference/android/widget/DatePicker.html Android DatePicker]</code> can be used instead.
 
==XML Attributes Description==
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Attribute
 
! scope="col" | Description
 
|-
 
| title="Attribute" | <code>[[#gn:s_minDate|gn:s_minDate]]</code>
 
| title="Description" | Sets minimum permitted date
 
|-
 
| title="Attribute" | <code>[[#gn:s_maxDate|gn:s_maxDate]]</code>
 
| title="Description" | Sets maximum permitted date
 
|}
 
 
==<code>gn:s_minDate</code>==
 
Sets minimum permitted date
 
 
''(String)'' values = <code>current</code>, <code>minusX</code>, <code>plusX</code>
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Value
 
! scope="col" | Description
 
|-
 
| title="Value" | <code>current</code>
 
| title="Description" | Sets the current date as minimum date
 
|-
 
| title="Value" | <code>minusX</code>
 
| title="Description" | Sets minimum date as current date minus <code>X</code> days
 
|-
 
| title="Value" | <code>plusX</code>
 
| title="Description" | Sets minimum date as current date plus <code>X</code> days
 
|}
 
 
==<code>gn:s_maxDate</code>==
 
Sets maximum permitted date
 
 
''(String)'' values = <code>current</code>, <code>minusX</code>, <code>plusX</code>
 
 
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
! scope="col" | Value
 
! scope="col" | Description
 
|-
 
| title="Value" | <code>current</code>
 
| title="Description" | Sets the current date as maximum date
 
|-
 
| title="Value" | <code>minusX</code>
 
| title="Description" | Sets maximum date as current date minus <code>X</code> days
 
|-
 
| title="Value" | <code>plusX</code>
 
| title="Description" | Sets maximum date as current date plus <code>X</code> days
 
|}
 

Revision as of 09:36, 17 March 2017

GnDatePicker

Widget XML tag
<com.ginstr.widgets.GnDatePicker>
Description
GnDatePicker inherits regular Android DatePicker widget.
It provides date entry.

XML Attributes Description

Attribute Description
gn:dataType represents widget data type

Can be

gn:s_minDate Sets minimum permitted date

Can be

  • current - Sets the current date as minimum date
  • minusX - Sets minimum date as current date minus X days
  • plusX - Sets minimum date as current date plus X days
gn:s_maxDate Sets maximum permitted date

Can be

  • current - Sets the current date as maximum date
  • minusX - Sets maximum date as current date minus X days
  • plusX - Sets maximum date as current date plus X days

Example

<com.ginstr.widgets.GnDatePicker
  android:id="@+id/meter_deinstallationDate" 
  android:visibility="gone"
  android:layout_width="match_parent" 
  android:layout_height="wrap_content"
  gn:dataType="date" />