summaryrefslogtreecommitdiff
path: root/core/java/android/widget/DatePickerCalendarDelegate.java
Commit message (Collapse)AuthorAgeFilesLines
* Recycle obtained TypedArraysNikolas Havrikov2022-02-101-0/+1
| | | | | | Bug: 218835043 Test: make Change-Id: I34f53b8767b34b77a8a8246e9d3863854477feb6
* Fixes minimum date in DatePickerGeorge Mount2021-05-141-0/+5
| | | | | | | | | | | | | Fixes: 158448787 When the day is earlier in than the minimum date, but the year is later, then the year is changed, the date gets set to a day that is earlier than the minimum date. This CL ensures that the year change can't bring the date outside of the range of minimum to maximum dates. Test: manual testing Change-Id: I0034bd513275267ecf9554f673533852e68dd854
* Fix incorrect leap year logicNeil Fuller2019-04-171-1/+1
| | | | | | | | | | | Fixing an issue for 2100 in SimpleMonthView. Tweak the logic in DatePickerCalendarDelegate to optimize for the common case and save a calculation. Bug: 28784177 Test: build only Change-Id: I7395ab9f3dc90ac4f7cef1edee6f7bc156f4ab76
* Fix incorrect leap year logicNeil Fuller2019-04-171-2/+2
| | | | | | | | Fixing an issue for 2100. Bug: 28784177 Test: build only Change-Id: I4579ba2d07b8157f368fd31df5396677156aeeb0
* Use correct date pattern for displaying year in DatePickerAlan Viverette2017-08-181-27/+19
| | | | | | | | Also uses lambdas where appropriate. Change-Id: I1b97745e434dc12cb88b427f8cd0b3cc66a73267 Fixes: 64339201 Test: visual check in Japanese locale
* Improved autofill support on DatePicker and TimePicker:Felipe Leme2017-08-151-7/+8
| | | | | | | | | | | | | - Save autofilled value so UI is properly highlighted. - Notify TimePicker listener just once. Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.DatePickerTest Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.TimePickerTest Fixes: 37098837 Change-Id: I38d64c107f6059b94c92676ea37681006474f519
* Disable state save/restore for inflated date/time picker viewsAdam Powell2017-05-231-0/+1
| | | | | | | | | | | | Fix a bug where the internal date/time picker views reused view IDs causing state save/restore bugs when placed within AlertDialogs and other places. Since the pickers already save/restore their state at a higher level leaving this enabled was redundant. Bug 32654446 Test: manual Change-Id: I3df2fc932ac5296ab6eb0a5013dddef8d1117635
* Added auto-fill support for DatePicker and TimePicker.Felipe Leme2017-03-011-2/+8
| | | | | | | | | | | | Also fixed some getAutoFillType() implementations to return null when the view is disabled. Bug: 33550221 Bug: 35840787 Test: CtsAutoFillServiceTestCases (with new tests) pass Test: m update-api Change-Id: I46acc1fb106cf2153515cc1c9567b34cfabd1c62
* Implicitly cast views obtained via View.findView methodsAlan Viverette2017-02-271-6/+6
| | | | | | | | | | Removes all explicit casts from android.widget classes. Also @removes methods on ListView that were overriding @hidden methods and should never have been exposed as public API. Bug: 24137209 Test: make Change-Id: I89f0e51258560987b3942251fd249210f825ac2a
* Revert "Implicitly cast views obtained via View.findView methods"Alan Viverette2017-02-031-6/+6
| | | | | | | | This reverts commit 06c2fffdaa81544522de751846754f781a9970a9. Reason for revert: Java 8 doesn't support this magic. Change-Id: Iaa41f4e4d0072b9a97cff9cd3788403d4ab79d13
* Implicitly cast views obtained via View.findView methodsAlan Viverette2017-01-271-6/+6
| | | | | | | | | | Removes all explicit casts from android.widget classes. Also @removes methods on ListView that were overriding @hidden methods and should never have been exposed as public API. Bug: 24137209 Test: make Change-Id: I6ccfc6f001b355c4880f2b54e1a5474df78d6228
* Fix import statements in android.widget package.Aurimas Liutikas2016-10-111-2/+2
| | | | | | | Additionally this CL removes spaces at the end of the line. Test: code still compiles. Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
* DatePicker A11Y fix time announced for date widgetsAndrei Stingaceanu2016-06-161-11/+1
| | | | | | | | | | | | | | | | | * introduced a new method (getFormattedCurrentDate) which formats the date for all DatePickerDelegates * implemented (moved) onPopulateAccessibilityEvent in the AbstractDatePickerDelegate thus all announcements for date pickers use the same format * note: added FORMAT_SHOW_WEEKDAY to the current format because I find the information valuable E.g: * Before: "Thu Jun 16 11:49:14 GMT+01:00 2016" * Now: "Thursday, 16 June 2016" Bug: 29099922 Change-Id: I94447067f10659747ae310f9e07cf3f487c97e05
* Add setOnDateChangedListener to DatePickerClara Bayarri2016-06-031-5/+3
| | | | | | | | | Also refactor slightly the hierarchy in TimePicker to use the common parent AbstractTimePickerDelegate in the same way as DatePicker. Bug: 28310875 Change-Id: Iecaf206ba1691e26d4496014dc1d13f070c4722a
* Merge "Fix DatePicker.setMin/MaxDate()" into nyc-devAlan Viverette2016-05-251-2/+4
|\
| * Fix DatePicker.setMin/MaxDate()Alan Viverette2016-05-251-2/+4
| | | | | | | | | | | | | | Previously it would only allow year changes, which... doesn't make sense. Bug: 28953902 Change-Id: I9b15b96662d9d496e11fb426ff23f14b26e90800
* | Use ICU's Calendar class in date picker & related classesAlan Viverette2016-05-251-1/+1
|/ | | | | | | Also organizes imports. Bug: 28756630 Change-Id: I4e59c4b35c88edd94ff4b2945ad9feb2a4bd0022
* Use standalone capitalization for month labelsAlan Viverette2016-05-161-1/+3
| | | | | Bug: 28020439 Change-Id: I85169a78142a43ff2348e0b561a7aa995544a65e
* Refactor DatePickerDialog constructors to avoid early callbackAlan Viverette2016-04-011-2/+2
| | | | | Bug: 27475444 Change-Id: I2536f969ca734f3977163305c1d33ee0e2e222fc
* Use Holo date/time picker layouts on very small screensAlan Viverette2016-03-011-126/+23
| | | | | | | | | | If the screen is smaller than "small" then use the Holo picker layouts. Unifies the SavedState between delegates so that we can seamlessly transition between them during configuration changes. Pushes the DatePickerSpinnerDelegate up to the same level as the calendar delegate. Bug: 27239893 Change-Id: Ida4dc2748d38bd766ae93d12aef15e963921939c
* Improve DatePicker focus for keyboards.George Mount2015-11-061-2/+16
| | | | | | | | | Bug 24873983 Focus moves properly within the SimpleMonthView and between components of the DatePicker. Change-Id: I61778f9b4f19536ff6c7a512f9b4faf7bf4447a7
* Pass setEnabled() value in calendar-mode DatePicker delegateAlan Viverette2015-06-031-4/+8
| | | | | | | | Fixes mContainer referencing wrong view. Also cleans up getCalendarView() exception message. Bug: 21211308 Change-Id: I4ad18206a8071b2c9b75d488e14fd53da6f5fa5b
* Move date picker arrows out of SimpleMonthViewAlan Viverette2015-04-171-3/+1
| | | | | | | Also fixes incorrect docs in Drawable. Bug: 20188255 Change-Id: I01c8563f734d9c1dad1e149bee80c651981e469f
* Fix date picker dialog sizeAlan Viverette2015-04-101-6/+6
| | | | | | | | Also fixes date picker instance state restore and cleans up the fade animations. Bug: 20110268 Change-Id: I503e2f81253077f22f1619834dc2f2634138ae4e
* Clean up date picker attributes, add caretsAlan Viverette2015-03-301-26/+5
| | | | | | Bug: 19819283 Bug: 19431364 Change-Id: Idd66f4ceb99d598c0f256d85c43bff6e25ccdd8f
* Clean up date pickerAlan Viverette2015-03-231-67/+8
| | | | | Bug: 19758502 Change-Id: I11ed62245d15d155335f5652000b9dc81185e2f9
* Update DatePicker and CalendarView to latest Material specAlan Viverette2015-03-231-222/+241
| | | | | Bug: 19431364 Change-Id: If364a051a5208d170495de4182e46b32c7560e08
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Merge "Implement landscape layout for time picker dialog"Alan Viverette2015-02-271-11/+0
|\
| * Implement landscape layout for time picker dialogAlan Viverette2015-02-261-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support overriding default alert dialog panel elements by including them in the dialog's custom content view, but no public API (yet!) since the panel IDs have never been public. Some minor cleanup and refactoring in TimePickerDialog. Removes Holo styles for "clock" and "calendar" style pickers since they are new in Material. If the new styles are used against Holo they will match Material but with Holo primary/accent colors. Also implements themed color state lists to resolve TODOs in both time and date pickers. Bug: 19431361 Change-Id: I095fd8d653e02d9e5d20d66611432a08a7a5685e
* | am f1eaa123: am 4d8caa55: am 8cba382f: Merge "Bad month value in DatePicker ↵Narayan Kamath2015-02-261-2/+2
|\ \ | |/ |/| | | | | | | | | in Calendar Mode" * commit 'f1eaa12385e36d835e805005e9bafde67f560f20': Bad month value in DatePicker in Calendar Mode
| * am 4d8caa55: am 8cba382f: Merge "Bad month value in DatePicker in Calendar Mode"Narayan Kamath2015-02-261-2/+2
| |\ | | | | | | | | | | | | * commit '4d8caa557670626768aabb55d213f9d091433d73': Bad month value in DatePicker in Calendar Mode
| | * am 8cba382f: Merge "Bad month value in DatePicker in Calendar Mode"Narayan Kamath2015-02-261-2/+2
| | |\ | | | | | | | | | | | | | | | | * commit '8cba382f04e4ead4a6b8c4a74216ddb383e8db91': Bad month value in DatePicker in Calendar Mode
| | | * Bad month value in DatePicker in Calendar ModeYou Kim2015-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Calendar MONTH field is zero based. Use predefined month. Change-Id: I957bf385dc8e877e8698dacad68808f4d9d8a6d0
* | | | am 7286d1ff: am 157c75e4: am 504c77e1: am d611fc4e: Merge "Fix year picker ↵Alan Viverette2015-02-181-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | initial range" into lmp-mr1-dev * commit '7286d1ff3747d3a71aeb2c8724947b35cc77d2d5': Fix year picker initial range
| * | | Fix year picker initial rangeAlan Viverette2015-02-171-0/+1
| |/ / | | | | | | | | | | | | BUG: 19410328 Change-Id: I2a2952eb58eb856f93b7af2f49e08abe71078aa9
* | | First quick implementation of auto assist data.Dianne Hackborn2015-02-061-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
* | | Update year picker to use activation colorsAlan Viverette2015-01-081-13/+19
| | | | | | | | | | | | Change-Id: I148b592538e1e4a928bd7ebb99a3083b760b839d
* | | Fix date picker color handling, expose StateSet utils in more placesAlan Viverette2015-01-071-4/+5
|/ / | | | | | | | | | | | | | | | | | | Enabled use of color selectors for the day number text, which lets us use the "activated" text color and push the selection background opacity up to 100%. Also ensures the selector circle stays within the bounds of the selected day. BUG: 18864682 Change-Id: Ia36ea748f83e13683a1de8ac1a259d353578d61a
* | Avoid self-recursion if client calls init() from date listenerAlan Viverette2014-12-121-10/+9
| | | | | | | | | | BUG: 18736166 Change-Id: Ibe04040356f4a3e4479ea55c53a0e167144ff877
* | Always call onDateChanged() when the date picker selection changesAlan Viverette2014-12-101-24/+32
| | | | | | | | | | BUG: 18703635 Change-Id: I2f71aa2e3e053cc8afd1bb84641a9fb29de89c72
* | Implement Material-style delegate for CalendarViewAlan Viverette2014-11-131-6/+7
| | | | | | | | | | BUG: 18266649 Change-Id: Ifd749328754b82dc43259ca7dadb472e449bdfff
* | Clean up encapsulation in date picker classesAlan Viverette2014-11-061-16/+25
| | | | | | | | | | | | | | | | | | First step to replacing CalendarView with DayPickerView. Removes dependencies on the DatePickerController class and adds setters and listeners needed to hook up to DatePicker or CalendarView. BUG: 18266649 Change-Id: Ic215f96eaddc0048040ec6bca0d85b776216fd26
* | Fix min/max date range in DatePicker calendar modeAlan Viverette2014-10-241-34/+6
|/ | | | | | | Also cleans abstraction of various day/year pickers and adapters. BUG: 18104457 Change-Id: Ifde664788d8123a3123303940bac63c1350c2cd7
* Restore changes that were needed.Craig Mautner2014-09-161-6/+1
| | | | | | | | | Reverting the changes in ag/548487 also reverted alanv's changes in ag/547793. This restores alanv's changes. Fixes build. Change-Id: Ifa2aa928a3ad29fe49e52dbec4e4833538dfe7e9
* Revert "Fix various bugs in DatePickerCalendarDelegate"Craig Mautner2014-09-161-1/+6
| | | | | | | alanv@ fixed this yesterday. This reverts commit 82537efa4c5f4aad12b9aa249fb27eda21647f39. Change-Id: If2b91ee36f8b24f695200ac1a87a306246ee5e44
* Fix various bugs in DatePickerCalendarDelegateCraig Mautner2014-09-161-6/+1
| | | | | | | | These bugs were exposed by cts DatePickerTest. Fixes one item in 17459129. Change-Id: Ifab52c6e6e760b75633aa4fe8ccf2d724f587e09
* Merge "Add first day of week API to date picker" into lmp-devAlan Viverette2014-09-071-0/+11
|\
| * Add first day of week API to date pickerAlan Viverette2014-09-031-0/+11
| | | | | | | | | | BUG: 17377360 Change-Id: Id4c109ac68e083d488a4281655bf9411fea92163
* | Fix AM/PM text i18n and clean up keyboard support in time pickerAlan Viverette2014-09-031-8/+4
|/ | | | | | | | | | Also updates date picker to use drawable for the header background to match the implementation in time picker. The time picker background now supports showing a focused state ripple. BUG: 17344077 BUG: 16227517 Change-Id: Ida715badb4a151fc16edd91fd4a0dae32953c99e