summaryrefslogtreecommitdiff
path: root/core/java/android/app/TimePickerDialog.java
Commit message (Collapse)AuthorAgeFilesLines
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-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: I8789f8499d4dca08580672e9e45ed9a7026dd686
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.app.usage android.app.trust android.app.timezonedetector android.app.timezone android.app.timedetector android.app.job android.app.backup android.app.assist android.app.admin android.app 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: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
* TimePickerDialog OTG keyboard entry discardedTianran Li2017-11-131-0/+3
| | | | | | | | | | | | | | | | | | | | A user can manually enter time value using a keyboard. NumberPicker then evaluates its value when focus is changed. Currently when the dialog is closed by pressing OK, the value from the focused NumberPicker is not taken into consideration. To ensure retrieval of the correct value when closing the dialog, the focus must be removed from the NumberPicker as is done in DatePickerDialog. Bug: 65664546 Test: Manual 1. Connect physical keyboard via OTG connector 2. Enter Settings and set time manually 3. Select keyboard entry 4. Change time and tap OK The entered time should be applied Change-Id: I8a77cb3aaa54acb228ec1ce0e9385e2eb5e88e9b
* Fix TimePickerDialog positive button clicks.Aurimas Liutikas2017-05-311-4/+1
| | | | | | | | | | | With my TimePickerDialog change to support keyboard based input I accidentally broke TimePickerDialog#onClick as it was no longer being called, instead it was calling TimeSetListener directly. This CL changes the logic back to use onClick again. Bug: 36042834 Test: Locally tested FitBit app. Change-Id: I47d5563c99cc46eaaf2b1d4a96483d6825fc5805
* Restore TimePickerDialog#onClick behavior.Aurimas Liutikas2017-03-131-0/+9
| | | | | | | | | | | | | onClick used to dismiss the dialog recording the set time. In ag/1831151 I removed handling of BUTTON_POSITIVE as the button clicks were now handled via click listener set in show(). However, onClick can be also called programatically and not just via clicking the button. This CL restores that behavior. It will skip validation and use the last valid hour and minute. Bug: 36037351 Test: TimePickerDialogTest#testOnClick now passes Change-Id: I15952dadab0c7b73ae5fecb1539edf5ebddec68c
* Adding text input mode to TimePicker.Aurimas Liutikas2017-02-061-6/+17
| | | | | | | Test: Tests will have a follow up CL. Bug:30044800 Change-Id: I71a0fba97026da76251768016edf1b159617abb9
* Allow developer to override Material-style modes in picker dialogsAlan Viverette2016-09-221-5/+16
| | | | | | | | | | | | | 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
* Clean up TimePickerAlan Viverette2015-11-161-15/+1
| | | | | | | | | No functional changes, only refactoring: - shorten method and variable names - remove unused validation callback - avoid using return in setters Change-Id: Ie7c19cfe3c5cb515695f943c534899d37ad032bb
* Implement landscape layout for time picker dialogAlan Viverette2015-02-261-34/+46
| | | | | | | | | | | | | | | 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
* Cancel dialog when TimePickerDialog's BUTTON_NEGATIVE is clickedAlan Viverette2014-11-261-0/+3
| | | | | BUG: 18541882 Change-Id: I2ba4611e08ba08667ef5ee4fb556d1c9075ca6d2
* Fix alert, date picker, time picker dialogs for TV.Craig Stout2014-08-151-0/+1
| | | | | | b/15194230 Change-Id: I85bcef86332acb041e5c3b1f8c515d981486c3d1
* Fix date and time picker stylingAlan Viverette2014-08-151-67/+53
| | | | | | | | | | | | | | 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
* Fix timepicker double done buttons.Craig Stout2014-07-171-1/+5
| | | | | | | Leanback theme uses a legacy layout with a done button, but apps won't necessarily have target apilevel L. Change-Id: Ib38b08df1fe07bd8fb4e64e93633ce0b7eb12567
* Add public attributes for TimePicker stylingAlan Viverette2014-07-171-9/+8
| | | | | BUG: 11218747 Change-Id: Ifdf981280ebe20a9066f219c9a4505d0d7486b2e
* Fix bug #16309454 Broken recent button after dismissing set time dialogFabrice Di Meglio2014-07-161-2/+7
| | | | | | - correct set and use the Canceled state Change-Id: Id60ae14c493254193ee677b66388a64a49618273
* Fix TimePicker behaviorFabrice Di Meglio2014-07-111-8/+8
| | | | | | | | - use Alert Theme and make the TimePickerDialog show its done button in the legacy mode - if targetSdkVersion < L or if TV UI show the legacy TimePicker Change-Id: I19ca6dbbcb50599c7e230262a23956c185f53a5c
* TimePickerDialog does not force new ui on TV.Craig Stout2014-07-071-2/+7
| | | | | | | | | | Add support for done button in LegacyTimePickerDelegate. Provide leanback themed legacy time picker layout with buttons on the side. b/15194230 Change-Id: Ie05c1cf45b334e9642095d63c682aba314ff3c6b
* AlertDialog and AppError themes for TV.Craig Stout2014-05-131-0/+1
| | | | | | | | | | | | | | | | Leanback themes override AlertDialog styles from other themes. Makes system alert dialogs, and alert dialogs from games running on ATV, have a style more appropriate to television. Final visuals pending. Side button layout fixes DatePickerDialog and TimePickerDialog with dpad navigation. TODO: consider using side button layout for other AlertDialog cases (long messages and lists). Change-Id: I74e4e04d16d6854377580be95a87684a0385b04b
* Update TimePicker widget and its related dialogFabrice Di Meglio2013-09-271-13/+32
| | | | | | | | | | | | | | | | | | | - the old TimePicker widget is still there for obvious layout compatibility reasons - add a new delegate implementation for having a new UI based on a radial picker - use the new delegate only for the TimePickerDialog (which does not need to be the same) - added support for Theming and light/dark Themes - added support for I18N (hour formatting and time separator and also position of AM/PM indicator coming from Unicode CLDR) - added support for RTL - verified support for Keyboard - verified that CTS tests for TimePicker are passing (for both the legacy and the new widgets) Also added a new HapticFeedbackConstants.CLOCK_TICK and its related code for enabling ticks vibration. Change-Id: Ib9b53a152bd9e97383dc391ef8c26da91217298f
* docs: fix a bunch of links from javadocs to api guidesScott Main2012-07-241-2/+2
| | | | | | and add some attributes to Spinner and Switch Change-Id: If015ad000c1a36e19904c132e98ebff1ceaf718b
* Polish the Number/Date/Pickers per UX request.Svetoslav Ganov2012-04-021-8/+16
| | | | | | | | | | | | | | 1. Now the NumberPicker max height is a bit smaller. 2. The Time/Date picker add top and bottom margin to compensate for the shorter NumberPickers. 3. The Time/DatePicker dialogs have only "Done" button and tapping onside saves the current state. bug:6277808 Change-Id: I4c5928debb1c3b7fe126d6cd6745e3c5eb980901
* NumberPicker incorrectly shown for the old theme.Svetoslav Ganov2011-11-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 1. NumberPicker is trying to greedily grow to its max size but if the max size is not specified the default value was the max integer which makes the widget get quite tall in some cases. Now the widget tries to reach the max size only if it has been specified. 2. NumberPicker was not computing its min width when the array of display values is set. 3. DatePicker' layout for the old Theme was adding a margin on the right of the group of spinners and if the calendar view is not shown the spinners were not centered. Added the spinners right margin to the left margin of the calendar view. 4. TimePickerDialog was using the wrong conext and was not dismissable on an outside touch. Same for the DatePickerDialog context. bug:5646161 Change-Id: Ic15f9b3e6291b76493604230ceb4f783a04d4ac7
* Fix Incorrect Times in TimePickerDialogBrian Muramatsu2011-02-011-2/+2
| | | | | | | | | | | | Bug 3414311 TimePicker#setCurrentHour subtracts 12 from the given hour if is24HourView returns false. TimePickerDialog calls setCurrentHour before setIs24HourView, so the 12 will always be substracted from the time. Reorder the statements so that TimePickerDialog sets is24HourView, before setting the hour and time. Change-Id: Ib997397b04dbdd767e67806aea7614426019e938
* Bug 3191746. atePicker TimePicker: Dark theme is used in a Light theme appSvetoslav Ganov2010-12-171-6/+1
| | | | Change-Id: I20d0cca3b78af9db80854a57c88d6cab3b00f555
* New Number picker widgetSvetoslav Ganov2010-11-291-23/+9
| | | | Change-Id: I834e725b58682e7a48cc3f3302c93c57b35d4e27
* Holo themes and assets in progressAdam Powell2010-09-271-1/+5
| | | | Change-Id: Ic10480dc1c771d0ccd10f1d4014c945480fd6c0d
* am 70c9ffbc: am 11a72482: Merge "docs: add links from widget classes to ↵Scott Main2010-08-191-0/+3
|\ | | | | | | | | | | | | | | | | tutorials" into froyo Merge commit '70c9ffbc838271f0ea27a4780eb146287de53ef6' into gingerbread-plus-aosp * commit '70c9ffbc838271f0ea27a4780eb146287de53ef6': docs: add links from widget classes to tutorials
| * docs: add links from widget classes to tutorialsScott Main2010-08-191-0/+3
| | | | | | | | Change-Id: I817e885524951853182b0458df4a32dea1614243
* | Replaced deprecated calls to setButton and setButton2Christian Mehlmauer2010-06-251-13/+14
|/ | | | Change-Id: Ifcc3f3afc1689406a3298dab7b00a8edb83c115e
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+162
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-162/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-1/+1
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+162