From wiki.ginstr.com
Jump to: navigation, search
(XML Attributes Description)
(XML Attributes Description)
Line 38: Line 38:
 
* <code>range</code>
 
* <code>range</code>
 
|-
 
|-
| title="Attribute" | <code>gn:s_minDate</code>
+
| title="Attribute" | <code>gn:selectionColor</code>
| title="Description" | Sets minimum permitted date
+
| title="Description" | Represents the color of the selector
Can be
+
 
* <code>current</code> - Sets the current date as minimum date
+
Can be any hex color representation
* <code>minusX</code> - Sets minimum date as current date minus <code>X</code> days
+
* <code>#000000</code>
* <code>plusX</code> - Sets minimum date as current date plus <code>X</code> days
 
|-
 
| title="Attribute" | <code>gn:s_maxDate</code>
 
| title="Description" | Sets maximum permitted date
 
Can be
 
* <code>current</code> - Sets the current date as maximum date
 
* <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
 
 
|}
 
|}
  

Revision as of 10:56, 19 March 2020

GnCalendar (M103.8.1)

Widget XML tag
<com.ginstr.widgets.GnCalendar>
Description
GnCalendar inherits MaterialCalendarView widget.
Provides single, multiple and range date selection.

XML Attributes Description

Attribute Description
gn:showOtherDates By default, only days of one month, in the min-max range, are shown.

Flags are described here: https://github.com/prolificinteractive/material-calendarview/wiki/Customization#showing-other-dates

Can be

  • other_months
  • out_of_range
  • decorated_disabled
  • none
  • all
  • defaults
gn:selectionMode Four modes of selection are supported single, multiple, range or none. The default is single selection.

Flags are described here: https://github.com/prolificinteractive/material-calendarview/wiki/Customization#xml

Can be

  • none
  • single
  • multiple
  • range
gn:selectionColor Represents the color of the selector

Can be any hex color representation

  • #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:dataType="date" />