summaryrefslogtreecommitdiff
path: root/core/java/android/widget/DatePicker.java
Commit message (Collapse)AuthorAgeFilesLines
* Update language to comply with Android's inclusive language guidanceJeff Sharkey2020-09-141-1/+1
| | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference Test: none Bug: 168334533 Exempt-From-Owner-Approval: docs updates Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-091-1/+1
| | | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I41e12e425284e74561c6b61663241df364ae54a1 Merged-In: I41e12e425284e74561c6b61663241df364ae54a1
* Rename @EnumEntry and @FlagEntryAshley Rose2019-03-181-2/+2
| | | | | | | Test: atest CtsViewInspectorAnnotationProcessorTestCases Bug: 127531820 Exempt-From-Owner-Approval: Annotation-only change Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* @InspectableProperty coverage for android.widgetAshley Rose2019-02-041-0/+13
| | | | | | | | | A few getters for view properties have been added where they were missing. CTS tests for the new APIs are pending in b/123894719. Test: m framework Bug: 120492712 Change-Id: I743ce693d384eaf749ced3db7f81bda7d19ed275
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-211-0/+3
| | | | | | | | | | | | | | | | For packages: android.widget This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
* Add more IntDef prefixes for auto-documenting.Jeff Sharkey2017-12-131-1/+4
| | | | | | | Test: builds, boots Bug: 70177949 Exempt-From-Owner-Approval: annotation-only changes Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
* Improved autofill support on DatePicker and TimePicker:Felipe Leme2017-08-151-14/+38
| | | | | | | | | | | | | - 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
* Provide a way to set AutofillId on ViewStructure.Felipe Leme2017-04-251-0/+1
| | | | | | | | | | | So far that was done indirectly by public methods that could be overridden in away that does not set the proper id in the structure, which would crash apps. Bug: 36171235 Test: modified VirtualContainerActivityTest#testAutofillOverrideDispatchprovideAutofillStructure Change-Id: I3f1c64020125cbb8349971a0bc52ccd1e0c81e62
* Minor fixes on Autofill Framework:Felipe Leme2017-04-241-2/+0
| | | | | | | | | | | | | | | | | | - Removed default implementation of onProvideAutofillVirtualStructure() that was using accessibility API (it's useless because without the View calling AutofillManager.notifyViewEntered(), it would never be triggered). - Fixed obsolete TODOs. - Removed obsolete service class name constant. - Removed unused debug constant. Fixes: 37078783 Fixes: 33197203 Bug: 33802548 Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183 Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
* Simplified autofill() methods by returning void instead of boolean.Felipe Leme2017-03-291-6/+5
| | | | | | Test: CtsAutoFillServiceTestCases pass Change-Id: Ic94e6686e291fed60ef6715bd160f9b568bf0ea6
* TRON log important auto-fill eventsPhilip P. Moltmann2017-03-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example log from android.autofillservice.cts.LoginActivityTest#testAutoFill#testAutoFillOneDatasetAndSave (translated from numbers of human readable string): AUTOFILL_SESSION_STARTED package=android.autofillservice.cts AUTOFILL_REQUEST type=TYPE_SUCCESS package=android.autofillservice.cts FIELD_AUTOFILL_SERVICE=android.autofillservice.cts FIELD_AUTOFILL_NUM_DATASETS=1 AUTOFILL_FILL_UI type=TYPE_ACTION package=android.autofillservice.cts FIELD_AUTOFILL_NUM_DATASETS=1 FIELD_AUTOFILL_FILTERTEXT_LEN=0 AUTOFILL_DATASET_APPLIED package=android.autofillservice.cts FIELD_AUTOFILL_NUM_VALUES=2 FIELD_AUTOFILL_NUM_VIEWS_FILLED=2 AUTOFILL_SAVE_UI package=android.autofillservice.cts FIELD_AUTOFILL_NUM_IDS=2 AUTOFILL_DATA_SAVE_REQUEST type=TYPE_SUCCESS package=android.autofillservice.cts FIELD_AUTOFILL_SERVICE=android.autofillservice.cts AUTOFILL_SESSION_FINISHED package=android.autofillservice.cts Test: Ran auto-fill tests and looked at event log. Change-Id: I58aaa58e4435e7d04c8cd91878411943d3eb13de
* Make it clear which type of AutoFillValue is setPhilip P. Moltmann2017-03-141-1/+8
| | | | | | | throw and handle errors if the wrong value is set for a view Test: android.autofillservice.cts.AutofillValueTest Change-Id: Ida80da7913a210bede6c47d6b7a6f215a012a84c
* Fix a few auto fill ussuesSvet Ganov2017-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Ensure clicking on a focused view brings up autofill if needed 2. Notify the autofill manager in a couple of cases we missed 3. Renamed the AutofillManager app facing APIs to better reflect what they do and added a API for the app to cancel the autofill interaction 4. Fix view structure dispatch where the ordering of children for autofill was mixed with ordering of direct view children - the autofill children may be indirect as views can be marked not important for autofill 5. Show scrollbars only if there are more fill options than want is shown 6. Show only three fill options and the rest can be accessed with a scroll 7. Remove the list divider to allow fill items to control all fill window content 8. Renamed the autofill manager internal service classes to xxAutofillxx 9. Fixed a comment that was not addressed in a previous CL 10. Showing max three fill options - rest needs a scroll 11. Make sure fill UI shown when filter with no matches is changed to filter with some matches 12. Make sure the fill window has a shadow Test: Autofill CTS tests pass and manual bug:36038929 bug:36040101 bug:36149166 bug:36034681 bug:36126001 bug:36035654 Change-Id: Ic8726146fc3c0a19d3e536becdd63fb65622136e
* Replaced auto-fill by autofill to keep it consistent with API style.Felipe Leme2017-03-091-10/+10
| | | | | | | | | | | | | | This change will affects 2 types of apps: autofill service implementations and apps that use autofill APIs. Since just the former is known to be used at the moment, we're not trying to keep backward compatibility with the latter. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Test: android.provider.SettingsBackupTest pass Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
* Optimize ViewStructure for autofill by removing irrelevant nodes.Felipe Leme2017-03-081-0/+5
| | | | | | | Test: CtsAutoFillServiceTestCases (with new tests) pass Fixes: 35840787 Change-Id: Iaa2c1907c8383b4a820fd7204e67fa2d276ad2b8
* Replace AutoFillType by view constants.Felipe Leme2017-03-071-3/+2
| | | | | | | | | | | | | | | Now that AutoFillType does have any logic (since the "subType" logic was moved to AutoFillHint), it makes more sense to get rid of the type and use constants directly. This change creates the contants and "pseudo-deprecate" the old stuff: it's still available because some clients are using it, but it will be removed once they migrate. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Change-Id: I0efe7f0cc101c86164a18c85903bb871e1f13ba2
* Added auto-fill support for DatePicker and TimePicker.Felipe Leme2017-03-011-0/+60
| | | | | | | | | | | | 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
* 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
* resolve merge conflicts of 6e37f8a to masterAndreas Gampe2016-09-251-4/+54
|\ | | | | | | Change-Id: I4fdcce7554977a56fd0f7e4ad4804929112d5599
| * Allow developer to override Material-style modes in picker dialogsAlan Viverette2016-09-221-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | A recent fix prevented developers from specifying Holo-style mode when displaying a date or time picker dialog. This CL also cleans up unused code in TimePickerDialog and documents how themeResId will be used. Adds hidden @TestApi methods for use in CTS tests. These may be made public later, but it's too late in MR1 for API changes. Bug: 31586821 Test: Ice2e203983769f1ea1cfa93105eb97b6fa5176b9 Change-Id: I1b7512b7647ddd7ab987beac2c0aef4fe7cc16bc
* | DatePicker A11Y fix time announced for date widgetsAndrei Stingaceanu2016-06-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0/+17
|/ | | | | | | | | Also refactor slightly the hierarchy in TimePicker to use the common parent AbstractTimePickerDelegate in the same way as DatePicker. Bug: 28310875 Change-Id: Iecaf206ba1691e26d4496014dc1d13f070c4722a
* Use ICU's Calendar class in date picker & related classesAlan Viverette2016-05-251-4/+4
| | | | | | | Also organizes imports. Bug: 28756630 Change-Id: I4e59c4b35c88edd94ff4b2945ad9feb2a4bd0022
* Deprecate methods not supported by Material-style date pickerAlan Viverette2016-04-061-1/+14
| | | | | Bug: 28039932 Change-Id: Ide53b42c9197ca9076184adef2e96170dd24785a
* Refactor DatePickerDialog constructors to avoid early callbackAlan Viverette2016-04-011-2/+0
| | | | | Bug: 27475444 Change-Id: I2536f969ca734f3977163305c1d33ee0e2e222fc
* Use Holo date/time picker layouts on very small screensAlan Viverette2016-03-011-651/+85
| | | | | | | | | | 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
* Fixed calendar fields comparisonPhilipp Hasper2016-01-081-2/+2
| | | | | | | Month was compared with the day and vice versa. Found by dukejeffrie. Change-Id: Ic4efca440c408325819ff1df85db7b407cf3207e
* Docs nitAlan Viverette2015-03-231-1/+1
| | | | Change-Id: I390997826db6997f843cafc4136633937e185e82
* Clean up date pickerAlan Viverette2015-03-231-10/+24
| | | | | Bug: 19758502 Change-Id: I11ed62245d15d155335f5652000b9dc81185e2f9
* Update DatePicker and CalendarView to latest Material specAlan Viverette2015-03-231-5/+8
| | | | | Bug: 19431364 Change-Id: If364a051a5208d170495de4182e46b32c7560e08
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-23/+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
* Fix accessibility delegationAlan Viverette2015-01-071-7/+11
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* Update documentation for DatePicker to reflect the new modeAlan Viverette2014-11-241-6/+22
| | | | | BUG: 18508605 Change-Id: I23d45bf1cd7783fa6f397c15f0ba6802e4069d6b
* 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
* Merge "Revert "Fix various bugs in DatePickerCalendarDelegate"" into lmp-devCraig Mautner2014-09-161-6/+6
|\
| * Revert "Fix various bugs in DatePickerCalendarDelegate"Craig Mautner2014-09-161-6/+6
| | | | | | | | | | | | | | alanv@ fixed this yesterday. This reverts commit 82537efa4c5f4aad12b9aa249fb27eda21647f39. Change-Id: If2b91ee36f8b24f695200ac1a87a306246ee5e44
* | Merge "Fix various bugs in DatePickerCalendarDelegate" into lmp-devCraig Mautner2014-09-161-0/+5
|\|
| * Fix various bugs in DatePickerCalendarDelegateCraig Mautner2014-09-161-6/+6
| | | | | | | | | | | | | | | | These bugs were exposed by cts DatePickerTest. Fixes one item in 17459129. Change-Id: Ifab52c6e6e760b75633aa4fe8ccf2d724f587e09
* | Properly handle dispatchRestoreInstanceState for new-style DatePickerAlan Viverette2014-09-151-9/+2
|/ | | | | | | Fixes reversed day/month/year in restore instance state. BUG: 17514055 Change-Id: Id839f2f0dbca47034dc84100dbeb1c32e8848178
* Merge "Add first day of week API to date picker" into lmp-devAlan Viverette2014-09-071-1/+60
|\
| * Add first day of week API to date pickerAlan Viverette2014-09-031-1/+60
| | | | | | | | | | BUG: 17377360 Change-Id: Id4c109ac68e083d488a4281655bf9411fea92163
* | Fix AM/PM text i18n and clean up keyboard support in time pickerAlan Viverette2014-09-031-2/+2
|/ | | | | | | | | | 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
* Fix date and time picker stylingAlan Viverette2014-08-151-31/+30
| | | | | | | | | | | | | | Removes done buttons from widgets, fixes date picker day selection, fixes dialog layouts in landscape, updates colors. Adds API on AlertDialog for setting the view by resource ID, which is necessary to correctly inflate the view against the dialog's parent view. BUG: 16941550 BUG: 16852521 BUG: 16878697 BUG: 16838659 BUG: 17047435 Change-Id: I138858ce06cd4abf68a2c3361ec170370236b33b
* Allow TimePicker/DatePicker to use legacy layout styleChet Haase2014-08-071-11/+18
| | | | | | | | | | | | | In L, the TimePicker was rewritten to use a clock face and the DatePicker was rewritten to use a calendar. This change allows developers to opt into the old style instead (android:timePickerMode="spinner|clock" and android:datePickerMode="spinner|calendar").) Issue #16717952 Pre-L style android.widget.TimePicker on L Issue #16846963 Allow developer to use legacy DatePicker appearance Change-Id: I4ee071fcbc5bf25eab83d6a5cb6ff352a603f90a
* Clean up TimePicker and DatePicker stylingAlan Viverette2014-07-291-333/+16
| | | | | | | | Removes the time and date picker specific themes and defaults their theme attributes to use the alert dialog theme attribute's value. BUG: 14973897 Change-Id: Id5cc74ea0c1a379fc1ee76b354a1bb5ba329585a
* Update DatePicker widget and its related dialogFabrice Di Meglio2014-07-151-15/+402
| | | | | | | | | | | | | | | | | | - the old DatePicker widget is still there for obvious layout compatibility reasons - add a new delegate implementation for having a new UI - use the new delegate only for the DatePickerDialog (which does not need to be the same) - added support for Theming and light/dark Themes - added support for RTL - added support for Accessibility - verified support for Keyboard - verified that CTS tests for DatePicker are passing (for both the legacy and the new widgets) Also added a new HapticFeedbackConstants.CALENDAR_DATE and its related code for enabling day selection vibration Change-Id: I256bd7c21edd8f3b910413ca15ce26d3a5ef7d9c
* resolved conflicts for merge of 04c987a8 to masterElliott Hughes2014-05-301-2/+2
|\ | | | | | | Change-Id: I27912e203e4d4e39aef6ffbb58b0934a2796ddfe