summaryrefslogtreecommitdiff
path: root/core/java/android/widget/DayPickerView.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove @CorePlatformApi LocaleData usage in frameworksVictor Chang2020-07-201-5/+1
| | | | | | | | | | | 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
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* DayPickerView - clamp date to min/maxAndrei Stingaceanu2017-06-131-8/+11
| | | | | | | | | | | | Besides clamping @ setMinDate() and setMaxDate() also clamp @ setDate(). Bug: 36636681 Bug: 62485314 Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t android.widget.cts.CalendarViewTest#testMinMaxRangeClampingMaterial Change-Id: I455cd43e7228e10d58b5f886dcab8332bca72de7
* Fix unexpected DatePicker validationAndrei Stingaceanu2017-06-061-14/+7
| | | | | | | | | | | | Remove throwing an error and instead clamp the selected date to min/max when changing ranges. Bug: 36636681 Test: manually verified that the case in the bug does not happen again Change-Id: If540f58d21375d2320df5215504d4569e5c2be2e
* Unbreak even more APK 26 apps running on "O" preview/beta builds.Jeff Sharkey2017-05-171-2/+2
| | | | | | Bug: 38391358 Test: builds Change-Id: Ic48f9cb53da3ed8241e5d40d3096304ee4dfebd2
* Remove unnecessary casts on calls to findViewByIdAlan Viverette2017-04-141-3/+3
| | | | | | | | Just frameworks/ this time. More paths to come. Bug: 24137209 Test: make -j32 Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
* CalendarView Material - fix exception if date is out of rangeAndrei Stingaceanu2017-02-211-3/+4
| | | | | | | | | | Due to not cherry-picking this change into N_MR1 fix the version check to reflect this. Bug: 28019187 Test: run cts-dev -m CtsWidgetTestCases -t \ android.widget.cts.CalendarViewTest Change-Id: I128d25c3ed949729e2afaeefad381bfb58d89ccd
* 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
* CalendarView Material - throw exception if date is out of rangeAndrei Stingaceanu2016-07-081-1/+15
| | | | | | | Similar to CalendarViewLegacyDelegate#goTo Bug: 28019187 Change-Id: Id21dcd208a594b98dc89caf59d36b32bdf9484be
* 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
* | Add @TestApi-guarded way to get bounds of specific day in CalendarViewKirill Grouchnikov2016-04-141-0/+11
|/ | | | | | | | Two separate implementation paths, one for Material look / layout, and one for legacy / pre-Material one. Bug: 28037149 Change-Id: Id1946802c0a93218d9eb0b73c81ad76dc027763c
* Return correct year in DayPickerPagerAdapter.getYearForPosition()Alan Viverette2015-05-151-2/+2
| | | | | | | | | Previously it wasn't offsetting the position by the min date's month, so it would be off by a year if the min date wasn't in January. Also now updates button visibility whenever the ViewPager's range changes. Bug: 21203303 Change-Id: Id7a41a4fa48843943c744fb0fecd4bebb798cee5
* Update button visibility as a final step in DayPickerView constructionAlan Viverette2015-05-141-0/+2
| | | | | | | | Previously it was only updated when the page was turned, but that listener isn't called until the user turns the page. Bug: 20701637 Change-Id: I06faf59660cda0e19d57766f4afd141e4a389b18
* Fix DatePicker max date, disabled day color, and arrow visibilityAlan Viverette2015-04-281-12/+8
| | | | | | | | | | | | | | | | | | 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-2/+16
| | | | | | | | | | | | | | 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-109/+156
| | | | | | | Also fixes incorrect docs in Drawable. Bug: 20188255 Change-Id: I01c8563f734d9c1dad1e149bee80c651981e469f
* Fix date picker dialog sizeAlan Viverette2015-04-101-0/+92
| | | | | | | | 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-1/+3
| | | | | | | | Also fixes initial day selection in DatePickerDialog. Bug: 19933912 Bug: 19937345 Change-Id: I88264a192c087361dbf21b055e74e1facf2506bc
* Clean up date picker attributes, add caretsAlan Viverette2015-03-301-1/+10
| | | | | | Bug: 19819283 Bug: 19431364 Change-Id: Idd66f4ceb99d598c0f256d85c43bff6e25ccdd8f
* Update DatePicker and CalendarView to latest Material specAlan Viverette2015-03-231-422/+138
| | | | | Bug: 19431364 Change-Id: If364a051a5208d170495de4182e46b32c7560e08
* Merge "Fix accessibility delegation"Alan Viverette2015-01-081-6/+11
|\
| * Fix accessibility delegationAlan Viverette2015-01-071-6/+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
* | Fix date picker color handling, expose StateSet utils in more placesAlan Viverette2015-01-071-0/+4
|/ | | | | | | | | | 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
* Implement Material-style delegate for CalendarViewAlan Viverette2014-11-131-17/+68
| | | | | BUG: 18266649 Change-Id: Ifd749328754b82dc43259ca7dadb472e449bdfff
* Clean up encapsulation in date picker classesAlan Viverette2014-11-061-79/+42
| | | | | | | | | 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
* Always update date picker position after change in rangeAlan Viverette2014-11-031-3/+3
| | | | | BUG: 18204507 Change-Id: Id3ae11cdb68f60901a3145ebd93f3acbbccd71d2
* Fix min/max date range in DatePicker calendar modeAlan Viverette2014-10-241-19/+50
| | | | | | | Also cleans abstraction of various day/year pickers and adapters. BUG: 18104457 Change-Id: Ifde664788d8123a3123303940bac63c1350c2cd7
* Update date and time picker stylingAlan Viverette2014-08-251-5/+0
| | | | | | | | | | | Change text sizes, fix year picker selected color, remove pulse animations, fix landscape layout centering. BUG: 17185948 BUG: 17187072 BUG: 14973897 BUG: 16938600 Change-Id: I11ad0abb217a950f4a96d1f781e08f09796c67bb
* Update DatePicker widget and its related dialogFabrice Di Meglio2014-07-151-0/+506
- 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