summaryrefslogtreecommitdiff
path: root/core/java/android/widget/SimpleMonthView.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Remove @CorePlatformApi LocaleData usage in frameworks" am: ↵vichang2020-07-221-3/+3
|\ | | | | | | | | | | | | | | 3f89b904a8 am: 226e3d7641 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1367376 Change-Id: Ib23a5ff1491c89d5cd0f962b1f609c988111c18b
| * Remove @CorePlatformApi LocaleData usage in frameworksVictor Chang2020-07-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | They can be replaced by the public API provided by ICU4J instead. No extra layer of caching equivalent to the LocaleData cache is added because ICU4J has caches instances, e.g. DateFormatSymbols, etc. Bug: 160606356 Test: atest FrameworksCoreTests:android.text.format Change-Id: I07048e0e1a4835d2744b7fce6a5ed79a112e456b
* | Process numpad enter key along with enter key.Byungsung You2020-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some views define only KEYCODE_ENTER action not KEYCODE_NUMPAD_ENTER. because of this, when numpad enter key is pressed expected result is not shown. We are adding KEYCODE_NUMPAD_ENTER to be processed in the same way as KEYCODE_ENTER. Test: Check that adb shell input KEYCODE_NUMPAD_ENTER and adb shell input KEYCODE_ENTER Bug: b/141329038 Change-Id: I87b5159c4fe71eaf8501059249c79b7cfd1752fc
* | Set "today" and "selected" for Datepicker when using Calenderyingleiw2019-10-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the stateDescription to "today" if the date is today. Set selected if the date is selected. Note that we didn't remove any information, so this change doesn't need to wait until talkback changes get in. Bug: 142361188, 141454158 Test: tested with date picker in calender mode. When the focus goes to today, it announces "today, Oct. 22". When the focus goes to selected date, it announces "selected, Oct. 22". When it is both today and selected, it announces "select, today, Oct. 22". Change-Id: Id210e22ec5ae2bc070c260c9632a605cf2a6236f
* | [SimpleMonthView] days should be set clickable even when disabledyingleiw2019-09-231-0/+1
|/ | | | | | | | | | | | | | | | | | | Currently, ACTION_CLICK is removed when a day is disabled. This causes the month to be the first non-title talkback focusable item and talkback places the initial focus on the month and announces all the disabled dates. According to discussion, disabling an item should not change whether it is talkback focusable. We still set the days as clickable even when they are disabled. After the fix, the disabled days are also focusable (and will be announced as disabled when talkback focus goes there). The initial focus will go the first non-title focusable item (previous or next month button). Bug: 122831096 Test: Tested that after the fix, the initial focus will go the first non-title focusable item (previous or next month button depends on the visibility). The month never gets accessibility focus. Change-Id: I925539282729d5d8418233fc95d3761ea2d0108f
* 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 monkey bug when focus change before layoutGeorge Mount2017-08-041-0/+4
| | | | | | | | | | | Bug 64359848 Monkey found a divide-by-zero error caused by the width not set when focus was changed before layout. This CL just ensures that there is no divide by zero by selecting the first row/column. Test: manually launched Date Picker and it didn't crash Change-Id: Id6dd12cd20b052af71ab980c8a694020ea679e7c
* Fix import statements in android.widget package.Aurimas Liutikas2016-10-111-6/+6
| | | | | | | Additionally this CL removes spaces at the end of the line. Test: code still compiles. Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
* Custom pointer icon for DatePicker and TimePickerVladislav Kaznacheev2016-09-231-0/+16
| | | | | Bug: 31652821 Change-Id: I512693a48c8c2f8ca96983efaaae3af138827ee7
* Merge commit '75dfc87e5e83c04adf876bc7d0d7cab17a31b4d5' into ↵Alan Viverette2016-05-251-1/+1
|\ | | | | | | | | | | manual_merge_75dfc87 Change-Id: Ib55f65f9b00ea6c6515d3e4fc59d86351398b7e1
| * Use ICU's Calendar class in date picker & related classesAlan Viverette2016-05-251-1/+1
| | | | | | | | | | | | | | Also organizes imports. Bug: 28756630 Change-Id: I4e59c4b35c88edd94ff4b2945ad9feb2a4bd0022
* | Merge "Use standalone capitalization for month labels" into nyc-dev am: ↵Alan Viverette2016-05-161-0/+2
|\| | | | | | | | | | | | | | | | | | | | | 895241170b am: cee6b62ce8 am: a9c50001aa * commit 'a9c50001aa0928f879d29c2dbbdd67591d510c47': Use standalone capitalization for month labels Change-Id: I34b06d007ffb330576278865cf7935e2f3f9cab6
| * Use standalone capitalization for month labelsAlan Viverette2016-05-161-0/+2
| | | | | | | | | | Bug: 28020439 Change-Id: I85169a78142a43ff2348e0b561a7aa995544a65e
* | Merge "Remove extra logging in DatePicker" into nyc-dev am: c952b035b2 am: ↵Alan Viverette2016-05-121-38/+0
|\| | | | | | | | | | | | | | | | | | | | | a6c89dd6a0 am: 4f440347f5 * commit '4f440347f5df680e982dc530c50c763b1fa438f3': Remove extra logging in DatePicker Change-Id: Ic299258ab626085c28277e9e67a81c7f6c76186f
| * Remove extra logging in DatePickerAlan Viverette2016-05-111-38/+0
| | | | | | | | | | | | | | Issue seems to be fixed now, don't need the extra logging. Bug: 27310206 Change-Id: Ibf53d056e9c5144729dae02c72050aebd90e4343
* | Merge "Update day of week labels when setting month params in ↵Alan Viverette2016-04-141-2/+4
|\| | | | | | | | | | | | | | | | | | | | | SimpleMonthView" into nyc-dev am: d51afa4 am: d2bead3 * commit 'd2bead39e43eafff9b067640416d916c2672b174': Update day of week labels when setting month params in SimpleMonthView Change-Id: Ie167fc1b59aa2cf7726bf1541b3d003318dd3ba6
| * Update day of week labels when setting month params in SimpleMonthViewAlan Viverette2016-04-141-2/+4
| | | | | | | | | | Bug: 27310206 Change-Id: I40c09fb5dddb202a17ac9c6ecee1d6f40644d9e6
* | Add @TestApi-guarded way to get bounds of specific day in CalendarViewKirill Grouchnikov2016-04-141-1/+1
|/ | | | | | | | Two separate implementation paths, one for Material look / layout, and one for legacy / pre-Material one. Bug: 28037149 Change-Id: Id1946802c0a93218d9eb0b73c81ad76dc027763c
* Pull weekday names directly from ICUAlan Viverette2016-03-291-14/+26
| | | | | | | Also adds more debug logging to setMonthParams(). Bug: 27238545 Change-Id: Ib7a0685a54a560bbfffee72455aafcd85c07eb2d
* Add temporary logging to SimpleMonthViewAlan Viverette2016-03-091-0/+22
| | | | | | | We can remove this once we figure out why the dates are messed up. Bug: 27310206 Change-Id: I34fff5251124cc0867955255189ed323dc7170c1
* Clean up SimpleMonthView formattersAlan Viverette2016-03-041-28/+43
| | | | | | | Only generates the month and day of week labels when necessary, rather than every time the headers are drawn. Change-Id: Ia20042753cba08bc6b29d4defb312617a2691016
* Improve DatePicker focus for keyboards.George Mount2015-11-061-6/+247
| | | | | | | | | Bug 24873983 Focus moves properly within the SimpleMonthView and between components of the DatePicker. Change-Id: I61778f9b4f19536ff6c7a512f9b4faf7bf4447a7
* Switch SimpleDateFormat to icu versionDeepanshu Gupta2015-08-061-1/+1
| | | | Change-Id: Ic603c7849edc91b010febfa9013d1e0dc8b7c0f0
* Localize SimpleMonthViewChet Haase2015-07-171-2/+5
| | | | | | | | | | The days of the month were not being localized, resulting in English numbers for non-English languages. Now we format the numbers with the current locale. Issue #22540629 [MRA14D][Arab][Token] numbers displayed in english Change-Id: I2b17d55ba2d0aa47b5a28c8846c6cf9723ababb1
* Fix DatePicker max date, disabled day color, and arrow visibilityAlan Viverette2015-04-281-17/+32
| | | | | | | | | | | | | | | | | | Day validation moved from the PagerAdapter to the DayPickerView, which is widget that actually handles the touch interaction and disabled state for individual days. Fixed disabled states for primary and secondary activated text colors. Replaced old light/dark color state lists with themed versions. Removed conflicting view visibility changes for managing next and previous arrows in DayPickerView. Bug: 20630417 Bug: 20641013 Bug: 20641879 Change-Id: Icdaf02a3b57ec162169c31b8a27ebea908552321
* Implement RTL support in framework ViewPager, DatePickerAlan Viverette2015-04-221-9/+47
| | | | | | | | | | | | | | Lays out ViewPager in the opposite direction when in RTL mode, e.g. the first item's starting edge is laid out at the largest possible scrolling distance. This preserves both the meaning of positive scrollX values and the meaning of positive adapter positions. Also removes clickable attribute from DayPickerView since it has a virtual view hierarchy. Bug: 19408740 Bug: 20134073 Change-Id: Ib6f945335bd88da59c8c593c7c270e290e15d0a5
* Move date picker arrows out of SimpleMonthViewAlan Viverette2015-04-171-179/+35
| | | | | | | Also fixes incorrect docs in Drawable. Bug: 20188255 Change-Id: I01c8563f734d9c1dad1e149bee80c651981e469f
* Fix date picker dialog sizeAlan Viverette2015-04-101-15/+3
| | | | | | | | Also fixes date picker instance state restore and cleans up the fade animations. Bug: 20110268 Change-Id: I503e2f81253077f22f1619834dc2f2634138ae4e
* Scale month view for small screens, use verbatim span for AM/PM labelAlan Viverette2015-04-011-28/+66
| | | | | | | | Also fixes initial day selection in DatePickerDialog. Bug: 19933912 Bug: 19937345 Change-Id: I88264a192c087361dbf21b055e74e1facf2506bc
* Clean up date picker attributes, add caretsAlan Viverette2015-03-301-85/+270
| | | | | | Bug: 19819283 Bug: 19431364 Change-Id: Idd66f4ceb99d598c0f256d85c43bff6e25ccdd8f
* Update DatePicker and CalendarView to latest Material specAlan Viverette2015-03-231-313/+382
| | | | | Bug: 19431364 Change-Id: If364a051a5208d170495de4182e46b32c7560e08
* Use text ascent / descent to center SimpleMonthView labelsAlan Viverette2015-01-081-16/+27
| | | | | | | | | Also updates Canvas.drawText() docs to clarify that the y-origin is actually the baseline rather than the top (which is what developers expect). BUG: 18864682 Change-Id: Ibfa2a79327d17b5135f90468195fbeca922a25c8
* Fix date picker color handling, expose StateSet utils in more placesAlan Viverette2015-01-071-119/+105
| | | | | | | | | | 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
* Fix min/max date range in DatePicker calendar modeAlan Viverette2014-10-241-11/+9
| | | | | | | Also cleans abstraction of various day/year pickers and adapters. BUG: 18104457 Change-Id: Ifde664788d8123a3123303940bac63c1350c2cd7
* Add support for Explore by Touch to RadialTimePickerViewAlan Viverette2014-10-241-1/+2
| | | | | | | | Also adds IntArray, which is like LongArray for integers, and prevents the AM/PM label text in the time picker header from wrapping. BUG: 17468036 Change-Id: I7120089885709f23e20368927e4b3ed9db2e5393
* Use Calendar day of week rather than Time in SimpleMonthViewAlan Viverette2014-09-101-4/+9
| | | | | BUG: 17377360 Change-Id: I685f35b760c049edaa8934eccaf5ce1bbf326cf2
* Use correct single-letter date format in SimpleMonthViewAlan Viverette2014-08-191-7/+19
| | | | | | | Also fixes layout on sw600dp-land (by removing the sw600dp layout!). BUG: 17068298 Change-Id: I2545d0e1904a0028156b96b6ad17674c6107ce5d
* Fix date and time picker stylingAlan Viverette2014-08-151-21/+17
| | | | | | | | | | | | | | 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 bug #16245852 Clean SimpleMonthView.setMonthParams() in the new DatePickerFabrice Di Meglio2014-07-251-68/+32
| | | | | | | - simply create a method for passing those parameters - remove non needed constants Change-Id: If6e7d21ff07370edd8c73d1e9b5c5f820f3deb5d
* Update DatePicker widget and its related dialogFabrice Di Meglio2014-07-151-0/+720
- 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