Commit Graph

5063 Commits

Author SHA1 Message Date
Chris Banes
5cd13265af Fix NPE in ActionMenuView when there isn't a presenter
BUG: 19060917
Change-Id: I5d63aa6e85238ea7cec6faf60d444c98bc583293
2015-01-19 12:08:22 +00:00
Alan Viverette
3f221cf325 Ensure spinner variables are initialized correctly
Removes the popup context setter, since this property cannot change
after inflation without losing data from the AttributeSet.

Bug: 19046761
Change-Id: I622f50d1752446a5b5793706c388e67a46ad06da
2015-01-16 14:40:04 -08:00
Alan Viverette
f6e92936c7 am 78dfb182: am dbe54533: am 77e1f7a2: Merge "Ensure scroll assets are drawn with correct opacity" into lmp-mr1-dev
* commit '78dfb182d29259630277ee40d51c7350df1e7dac':
  Ensure scroll assets are drawn with correct opacity
2015-01-16 00:05:51 +00:00
Alan Viverette
3c8e3a96e9 Merge "Add popup theme for Spinner, use for actionBarPopupTheme default" 2015-01-15 22:50:26 +00:00
Alan Viverette
3355414b09 Merge "Allow views to be positioned relative to baseline-aligned views" 2015-01-15 22:48:59 +00:00
Alan Viverette
78dfb182d2 am dbe54533: am 77e1f7a2: Merge "Ensure scroll assets are drawn with correct opacity" into lmp-mr1-dev
* commit 'dbe54533499571f34ddc126ea21379932ea1d6d7':
  Ensure scroll assets are drawn with correct opacity
2015-01-15 22:37:40 +00:00
Alan Viverette
14af813940 Merge "Update radial time picker styling, clean up code" 2015-01-15 22:27:54 +00:00
Alan Viverette
77e1f7a27b Merge "Ensure scroll assets are drawn with correct opacity" into lmp-mr1-dev 2015-01-15 22:25:08 +00:00
Roozbeh Pournader
60f8df9339 am a601d44b: am a4d1e250: am 9787039d: Merge "Fudge getRightPaddingOffset in TextView to match clipRect." into lmp-mr1-dev
* commit 'a601d44baa4ff21d3888dd624c016dc07c5ff937':
  Fudge getRightPaddingOffset in TextView to match clipRect.
2015-01-15 22:17:35 +00:00
Alan Viverette
03748a5707 Ensure scroll assets are drawn with correct opacity
Bug: 18903443
Change-Id: I5a7e738b1a09c22857683e2540c96a050b82866e
2015-01-15 13:00:21 -08:00
Roozbeh Pournader
a601d44baa am a4d1e250: am 9787039d: Merge "Fudge getRightPaddingOffset in TextView to match clipRect." into lmp-mr1-dev
* commit 'a4d1e25000195b2349cb29e389d1ded4b23dc7a6':
  Fudge getRightPaddingOffset in TextView to match clipRect.
2015-01-15 19:21:01 +00:00
Raph Levien
a239ef91e5 Merge "Track TextView locale changes if not explicitly set" 2015-01-15 17:27:56 +00:00
Roozbeh Pournader
7c0e7db67e Fudge getRightPaddingOffset in TextView to match clipRect.
A previous change (df68999dc7) adjusted
the clipRect slightly on the right side, but didn't adjust the
padding offset used in fading.

Bug: 18820846
Change-Id: I68c0918f914742d1e7b91f9ea8d5acbd41938233
2015-01-14 16:19:48 -08:00
Raph Levien
2e3aa445b4 Track TextView locale changes if not explicitly set
The locale in the Paint used by TextView is set at the time the view
is created. If the locale changes and the locale hasn't been explicitly
set, better behavior is "whatever the current locale is." This patch
updates the locale in that particular case.

Bug: 16274782
Change-Id: I3b1b8e77c9508c757543ea50de3590d254404c1e
2015-01-14 16:12:53 -08:00
Alan Viverette
e1a65719af Allow views to be positioned relative to baseline-aligned views
Previously baseline alignment was handled as a separate pass after
normal bottom/top/etc. alignment, but this prevented views from being
laid out relative to baseline-aligned views.

BUG: 17938274
Change-Id: I5965110f012f3b27149b437ba3524cda84e9daf4
2015-01-14 12:30:04 -08:00
Alan Viverette
ec9fe1ad66 Update radial time picker styling, clean up code
Uses activation color for picker background. Removes bounce animation
when switching between hour and minute pickers. Improves touch handling
when touch moves outside the circle. Cleans up use of string in XML
where float should have been used. Fixes layout so that padding can be
adjusted.

Change-Id: Ibc8e087a83ca522272cdcd434b36cf38583bf541
2015-01-14 10:47:06 -08:00
Alan Viverette
b9ead4a915 Add popup theme for Spinner, use for actionBarPopupTheme default
Also adds methods for setting the context used to inflate drop-down
views in several adapters.

Bug: 17625714
Change-Id: Id267afa4901c1d46ceb3bc3b10fc642cea1799fe
2015-01-14 10:43:31 -08:00
Alan Viverette
4e5168fae4 Update year picker to use activation colors
Change-Id: I148b592538e1e4a928bd7ebb99a3083b760b839d
2015-01-08 15:25:30 -08:00
Alan Viverette
5dc973cb03 Use text ascent / descent to center SimpleMonthView labels
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
2015-01-08 11:12:39 -08:00
Alan Viverette
4456b81f22 Merge "Add popup window accessors for anchor overlap, gravity, window" 2015-01-08 00:37:17 +00:00
Alan Viverette
b97d69856d API for tinting TextView compound drawables
BUG: 18762354
Change-Id: Iba6fab4f63a5d26cb27606d25a1fd0a1f47afa57
2015-01-07 16:16:20 -08:00
Alan Viverette
2d4c476aca Merge "Fix accessibility delegation" 2015-01-08 00:07:25 +00:00
Alan Viverette
a54956a0bc Fix accessibility delegation
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
2015-01-07 16:05:02 -08:00
Alan Viverette
75d837954c Add popup window accessors for anchor overlap, gravity, window
Cleans up comments and some code in PopupWindow.

BUG: 18245054
Change-Id: I2111d0c194ee1a39aaa721083041fc139efcf630
2015-01-07 15:51:54 -08:00
Alan Viverette
c5b95c20b6 Fix date picker color handling, expose StateSet utils in more places
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
2015-01-07 13:57:12 -08:00
Deepanshu Gupta
02cab444fb am 9c8f8ed8: am 4a5baeae: Merge "resolved conflicts for a0bc2e7e to lmp-mr1-dev" into lmp-mr1-dev
automerge: f4d3973

* commit 'f4d3973c319502fc8aa3e1aa1d7e7502274ea3aa':
  resolved conflicts for a0bc2e7e to lmp-mr1-dev
2015-01-05 23:39:03 +00:00
Deepanshu Gupta
f4d3973c31 am 9c8f8ed8: am 4a5baeae: Merge "resolved conflicts for a0bc2e7e to lmp-mr1-dev" into lmp-mr1-dev
* commit '9c8f8ed8a8bee42ee48a27b055b11ace6255d09a':
  resolved conflicts for a0bc2e7e to lmp-mr1-dev
2015-01-05 23:36:57 +00:00
Deepanshu Gupta
4a5baeaec9 Merge "resolved conflicts for a0bc2e7e to lmp-mr1-dev" into lmp-mr1-dev 2015-01-05 23:26:04 +00:00
Alan Viverette
a1d11273d3 am 154d251e: am 22a3163f: Merge "Fix selector bug" into lmp-mr1-dev
automerge: 3f5f13d

* commit '3f5f13d7efb2756d5b9a2cc34c30ac23ced3947f':
  Fix selector bug
2015-01-05 20:36:30 +00:00
Alan Viverette
3f5f13d7ef am 154d251e: am 22a3163f: Merge "Fix selector bug" into lmp-mr1-dev
* commit '154d251ee61ad9c3d64b5c6db2d74806f4fd5782':
  Fix selector bug
2015-01-05 20:34:08 +00:00
Alan Viverette
22a3163f1d Merge "Fix selector bug" into lmp-mr1-dev 2015-01-05 20:23:47 +00:00
Alan Viverette
f35d2a0cb4 am db7eefbb: am dd508581: Use min when comparing AM and PM text lengths
automerge: 97b2d18

* commit '97b2d185b655186664ce5402fbce37faaafddf1d':
  Use min when comparing AM and PM text lengths
2015-01-05 20:14:32 +00:00
Alan Viverette
97b2d185b6 am db7eefbb: am dd508581: Use min when comparing AM and PM text lengths
* commit 'db7eefbbfdc8c77c03b43fd58bcd461b8e52b20e':
  Use min when comparing AM and PM text lengths
2015-01-05 20:11:57 +00:00
Alan Viverette
dd50858121 Use min when comparing AM and PM text lengths
Also cleans up code a little to prevent unnecessary re-computation
of lower-cased strings and use final where possible.

BUG: 18874813
Change-Id: I852eb7a281aed64ac36e95f32f5fa410f50abfa4
2015-01-05 11:28:12 -08:00
Deepanshu Gupta
f5b02eb7c4 resolved conflicts for a0bc2e7e to lmp-mr1-dev
The original change wasn't properly merged into lmp-mr1-dev because of
merge conflicts. This change manually resolves the conflicts. The main
reason for the conflict was that TimePickerSpinnerDelegate was swapped
with TimePickerClockDelegate.

This change also fixes the typo in the original change which was fixed
in a subsequent change.

Original commit: 12b6d29b7b
fix for typo: cb09bc45c5

Change-Id: I50bf8c2d86318f632465a38adfad16d1382a9319
2014-12-30 14:07:29 -08:00
Chet Haase
2167b11de6 Fix selector bug
Issue #18784539 Row stays highlighted if I begin scrolling after the rows been highlighted in "About phone"

Change-Id: Ia91467d8fe64eec077f20af70eae0d5bb070c255
2014-12-19 16:37:18 -08:00
Alan Viverette
4ae0d9045f am 2f11125a: am 9973643b: Merge "Give accessibility delegate the first pass at handling ACTION_CLICK" into lmp-mr1-dev
automerge: 878a5a6

* commit '878a5a6cd7109183928b9b8b533f11347fd0591a':
  Give accessibility delegate the first pass at handling ACTION_CLICK
2014-12-15 17:41:55 +00:00
Alan Viverette
f19ef0fdc3 am 2311ded6: am 2649c58b: Merge "Avoid self-recursion if client calls init() from date listener" into lmp-mr1-dev
automerge: 37ea640

* commit '37ea640fa9e8de304ce5f9c9576e370baa85929e':
  Avoid self-recursion if client calls init() from date listener
2014-12-15 17:40:42 +00:00
Alan Viverette
878a5a6cd7 am 2f11125a: am 9973643b: Merge "Give accessibility delegate the first pass at handling ACTION_CLICK" into lmp-mr1-dev
* commit '2f11125a7186cc65713804c939a0e538538d9f35':
  Give accessibility delegate the first pass at handling ACTION_CLICK
2014-12-15 17:38:25 +00:00
Alan Viverette
37ea640fa9 am 2311ded6: am 2649c58b: Merge "Avoid self-recursion if client calls init() from date listener" into lmp-mr1-dev
* commit '2311ded6a3da117aee221c0cf1168c24160d9041':
  Avoid self-recursion if client calls init() from date listener
2014-12-15 17:38:19 +00:00
Alan Viverette
9973643bfc Merge "Give accessibility delegate the first pass at handling ACTION_CLICK" into lmp-mr1-dev 2014-12-15 17:27:24 +00:00
Alan Viverette
0cecbc9c72 Avoid self-recursion if client calls init() from date listener
BUG: 18736166
Change-Id: Ibe04040356f4a3e4479ea55c53a0e167144ff877
2014-12-12 14:32:43 -08:00
Alan Viverette
cd305ae3ce Give accessibility delegate the first pass at handling ACTION_CLICK
Delegation is broken for widgets, but this fixes the most egregious issue
where TextViews that are top-level list items weren't handling CLICK
actions correctly. This will still need work, since now the focus action
won't run, but it's an improvement.

BUG: 18736135
Change-Id: I808ef628198946cc87f13c53d6245cd162a1e517
2014-12-12 14:13:24 -08:00
Alan Viverette
040b761af9 am 3ead4127: am ff441883: Merge "Improve time picker accessibility" into lmp-mr1-dev automerge: 4b7f724
* commit '3ead4127ae493508d064e106ec12f299e7116e8a':
  Improve time picker accessibility
2014-12-12 04:26:12 +00:00
Alan Viverette
3ead4127ae am ff441883: Merge "Improve time picker accessibility" into lmp-mr1-dev
automerge: 4b7f724

* commit '4b7f724fb23166f892781ae7daa2df76bede2134':
  Improve time picker accessibility
2014-12-12 04:21:42 +00:00
Alan Viverette
ff44188309 Merge "Improve time picker accessibility" into lmp-mr1-dev 2014-12-11 22:11:56 +00:00
Alan Viverette
302ce540a0 am 9e8fbe42: am 7171bf40: am 6c42ee47: Merge "Always call onDateChanged() when the date picker selection changes" into lmp-mr1-dev
* commit '9e8fbe42e96180f99fb2e2c4eccaa0441eb89b75':
  Always call onDateChanged() when the date picker selection changes
2014-12-11 01:38:48 +00:00
Alan Viverette
9e8fbe42e9 am 7171bf40: am 6c42ee47: Merge "Always call onDateChanged() when the date picker selection changes" into lmp-mr1-dev
* commit '7171bf40eca7dc0a044f0378082d7f7c1dfa2348':
  Always call onDateChanged() when the date picker selection changes
2014-12-11 00:07:32 +00:00
Alan Viverette
e6ec07fc5d Always call onDateChanged() when the date picker selection changes
BUG: 18703635
Change-Id: I2f71aa2e3e053cc8afd1bb84641a9fb29de89c72
2014-12-10 11:24:27 -08:00
Alan Viverette
3fc00e3139 Improve time picker accessibility
Overrides click action description for TimePicker hour/minute selectors
and manually specifies traversal order for radial time picker nodes.

BUG: 17468036
Change-Id: I4472b42a95d762085d7a4d382feb2b9216c0d41c
2014-12-10 09:46:49 -08:00