this is a wrap for this github project.
I´m VERY PROUD to present you this Date- and TimePicker Dialog library! I have tried to wrap about 20 different Date and TimePickers in the past 1,5 years. ALL UNSuccessfully. :-(
But this one i got working
MaterialDateTimePicker
Author: DonManfred (wrapper)
Version: 1.5
- Calendar
Fields:Methods:
- CANADA As Locale
- CANADA_FRENCH As Locale
- CHINA As Locale
- CHINESE As Locale
- ENGLISH As Locale
- FRANCE As Locale
- FRENCH As Locale
- GERMAN As Locale
- GERMANY As Locale
- ITALIAN As Locale
- ITALY As Locale
- JAPAN As Locale
- JAPANESE As Locale
- KOREA As Locale
- KOREAN As Locale
- PRC As Locale
- ROOT As Locale
- SIMPLIFIED_CHINESE As Locale
- TAIWAN As Locale
- TRADITIONAL_CHINESE As Locale
- UK As Locale
- US As Locale
- Initialize (dateformat As String, locale As Locale, date As String)
- IsInitialized As Boolean
- DatePickerDialog
Events:Methods:
- onCancel ( As )
- onDateSet (year As Int, monthOfYear As Int, dayOfMonth As Int)
- onDismiss ( As )
Properties:
- Initialize (EventName As String, year As Int, monthOfYear As Int, dayOfMonth As Int)
- IsInitialized As Boolean
- autoDismiss (autoDismiss As Boolean)
Set whether the picker should dismiss itself when a day is selected
autoDismiss: true if the dialog should dismiss itself when a day is selected- dismissOnPause (dismissOnPause As Boolean)
Set whether the picker should dismiss itself when being paused or whether it should try to survive an orientation change
dismissOnPause: true if the dialog should dismiss itself when it's pausing- isThemeDark As Boolean
Returns true when the dark theme should be used
Return type: @return:true if the dark theme should be used, false if the default theme should be used- setYearRange (startYear As Int, endYear As Int)
- show (tag As String)
- showYearPickerFirst (yearPicker As Boolean)
Set whether the year picker of the month and day picker is shown first
yearPicker: boolean- vibrate (vibrate As Boolean)
Set whether the device should vibrate when touching fields
vibrate: true if the device should vibrate when touching a field
- AccentColor As Int
Get the accent color of this dialog- AccentColor2 As String [write only]
Set the accent color of this dialog- CancelText As String [write only]
Set the label for the Cancel button (max 12 characters)- FirstDayOfWeek As Int [write only]
- HighlightedDays()() As Calendar
Sets an array of dates which should be highlighted when the picker is drawn- MaxDate As Calendar
Sets the minimal date supported by this DatePicker. Dates after (but not including) the
specified date will be disallowed from being selected.- MinDate As Calendar
Sets the minimal date supported by this DatePicker. Dates before (but not including) the
specified date will be disallowed from being selected.- OkText As String [write only]
Set the label for the Ok button (max 12 characters)- SelectableDays()() As Calendar
Set's a list of days which are the only valid selections.
Setting this value will take precedence over using setMinDate() and setMaxDate()- ThemeDark As Boolean [write only]
Set whether the dark theme should be used- Title As String [write only]
Set a title to be displayed instead of the weekday- TimePickerDialog
Events:Methods:
- onCancel ( As )
- onDismiss ( As )
- onTimeSet (hour As Int, minute As Int, second As Int)
Properties:
- Initialize (EventName As String, hourOfDay As Int, minute As Int, is24HourMode As Boolean)
- IsInitialized As Boolean
- dismissOnPause (dismissOnPause As Boolean)
Set whether the picker should dismiss itself when it's pausing or whether it should try to survive an orientation change
dismissOnPause: true if the picker should dismiss itself- enableSeconds (enableSeconds As Boolean)
Set whether an additional picker for seconds should be shown
enableSeconds: true if the seconds picker should be shown- is24HourMode As Boolean
- isThemeDark As Boolean
- setMaxTime (hour As Int, minute As Int, second As Int)
- setMinTime (hour As Int, minute As Int, second As Int)
- setStartTime (hourOfDay As Int, minute As Int)
- setStartTime2 (hourOfDay As Int, minute As Int, second As Int)
- setTimeInterval2 (hourInterval As Int, minuteInterval As Int)
Set the interval for selectable times in the TimePickerDialog
This is a convenience wrapper around setSelectableTimes
The interval for all three time components can be set independently
hourInterval: The interval between 2 selectable hours ([1,24])
minuteInterval: The interval between 2 selectable minutes ([1,60])- setTimeInterval3 (hourInterval As Int, minuteInterval As Int, secondInterval As Int)
Set the interval for selectable times in the TimePickerDialog
This is a convenience wrapper around setSelectableTimes
The interval for all three time components can be set independently
hourInterval: The interval between 2 selectable hours ([1,24])
minuteInterval: The interval between 2 selectable minutes ([1,60])
secondInterval: The interval between 2 selectable seconds ([1,60])- show (tag As String)
- vibrate (vibrate As Boolean)
Set whether the device should vibrate when touching fields
vibrate: true if the device should vibrate when touching a field
- AccentColor As Int
Set the accent color of this dialog- CancelText As String [write only]
Set the label for the Cancel button (max 12 characters)- MaxTime2 As Timepoint [write only]
- MinTime2 As Timepoint [write only]
- OkText As String [write only]
Set the label for the Ok button (max 12 characters)- SelectableTimes() As Timepoint [write only]
- ThemeDark As Boolean [write only]
Set a dark or light theme. NOTE: this will only take effect for the next onCreateView.- TimeInterval As Int [write only]
Set the interval for selectable times in the TimePickerDialog
This is a convenience wrapper around setSelectableTimes
The interval for all three time components can be set independently- Title As String
Set a title. NOTE: this will only take effect with the next onCreateView- Timepoint
Methods:
- Initialize (hour As Int, minute As Int, second As Int)
- IsInitialized As Boolean
View attachment 45424
View attachment 45425
Installation:
- Extract the contents (jar, xml and aar) of MaterialTimePickerV[x.yy].zip to your additional library folder
New in V1.5
- I have created an aar out from the third party lib with Android Studio
- I have changed the wrapper then to use the aar.
hello DonManfred, in the version of Android 2.3.6 when compiling in debug arrived in the line "diaDate.Initialize (" Date ", DateTime.GetYear (DateTime.Now), DateTime.GetMonth (DateTime.Now) -1, DateTime. GetDayOfMonth (DateTime.Now)) "the program exits without giving an error.
regards