From wiki.ginstr.com
Jump to: navigation, search
(XML Attributes Description)
(Example)
 
(9 intermediate revisions by 2 users not shown)
Line 16: Line 16:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | gn:dataType
+
| title="Attribute" | <code>gn:dataType</code>
 
| title="Description" | Represents widget data type
 
| title="Description" | Represents widget data type
 
Can be
 
Can be
Line 22: Line 22:
 
* <code>[[Datatypes#date|date]]</code>
 
* <code>[[Datatypes#date|date]]</code>
 
|-
 
|-
| title="Attribute" | gn:s_minDate
+
| title="Attribute" | <code>gn:s_minDate</code>
 
| title="Description" | Sets minimum permitted date
 
| title="Description" | Sets minimum permitted date
 
Can be
 
Can be
Line 29: 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" | gn:s_maxDate
+
| title="Attribute" | <code>gn:s_maxDate</code>
 
| title="Description" | Sets maximum permitted date
 
| title="Description" | Sets maximum permitted date
 
Can be
 
Can be
Line 35: Line 35:
 
* <code>minusX</code> - Sets maximum date as current date minus <code>X</code> days
 
* <code>minusX</code> - Sets maximum date as current date minus <code>X</code> days
 
* <code>plusX</code> - Sets maximum date as current date plus <code>X</code> days
 
* <code>plusX</code> - Sets maximum date as current date plus <code>X</code> days
 +
|-
 +
| 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_setOnDate]]</code>
 +
 +
==Data types==
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Input
 +
|-
 +
| title="Value" | <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| title="Value" | <code>[[Datatypes#date|date]]</code>
 +
|-
 +
| title="Value" | <code>[[Datatypes#dateTime|dateTime]]</code>
 +
|}
 +
 +
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 +
|-
 +
! scope="col" | Output
 +
|-
 +
| title="Value" | <code>[[Datatypes#date|date]]</code>
 +
|-
 +
| title="Value" | <code>[[Datatypes#dateTime|dateTime]]</code>
 
|}
 
|}
  
Line 43: Line 74:
 
   android:layout_width="match_parent"  
 
   android:layout_width="match_parent"  
 
   android:layout_height="wrap_content"
 
   android:layout_height="wrap_content"
 +
  gn:textColor="#000000"
 
   gn:dataType="date" />  
 
   gn:dataType="date" />  
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 00:57, 25 March 2020

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
gn:textColor(M103.8.1) Defines widget's color

Can be

  • hardcoded - hexadecimal color representation e.g. #000000

Events

gn:act_setClick
gn:act_setLongClick
gn:act_setOnDate

Data types

Input
text
date
dateTime
Output
date
dateTime

Example

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