2138 Commits

Author SHA1 Message Date
Alan Viverette
46b4920ac8 Merge "Propagate state changes even when we don't change drawable index" into lmp-mr1-dev 2014-10-21 18:14:50 +00:00
Alan Viverette
f81c6af10e Propagate state changes even when we don't change drawable index
Previously we could miss the state change if we were simply reversing the
current transition.

BUG: 17967405
Change-Id: I2cb396dedbff61b980741ef8c0d931be6abe129c
2014-10-20 14:42:53 -07:00
ztenghui
12d808a24f am a724d1ab: am 877ce2c4: Merge "Make sure the bitmap from VD\'s cache is drawn using bi-linear filter." into lmp-dev
* commit 'a724d1ab4083f08958bd88e76e15b7c0af337bfc':
  Make sure the bitmap from VD's cache is drawn using bi-linear filter.
2014-10-20 20:42:51 +00:00
ztenghui
eec6164e6f Make sure the bitmap from VD's cache is drawn using bi-linear filter.
b/17949291

Change-Id: I0e59852220ab8a3be2c70afa483e805029a9e19e
2014-10-16 15:40:04 -07:00
Alan Viverette
b70cfb9103 Merge "Avoid saveLayer in RippleDrawable if the background won't draw" into lmp-mr1-dev 2014-10-15 21:18:00 +00:00
Alan Viverette
9a00cbcc66 Merge "Update preload list, clean up drawable theming" into lmp-mr1-dev 2014-10-14 22:47:43 +00:00
Alan Viverette
17cd4dfe3a Update preload list, clean up drawable theming
Removes all implementations of three-arg ConstantState constructor, since
we handle mutation and applyTheme() in Resources now. Moves progress bar
tinting to android:tint attribute. Correctly implements applyTheme() and
canApplyTheme() in all drawable wrapper and container classes.

Change-Id: Ic9cb43d0d6228aa4914f3124bed234b837beaa41
2014-10-14 14:07:21 -07:00
Alan Viverette
42e96769ae Merge "Add support for tint and tintMode to GradientDrawable" into lmp-mr1-dev 2014-10-14 01:00:36 +00:00
Alan Viverette
788e30bd34 Merge "Revert "Always project ripples"" into lmp-mr1-dev 2014-10-14 00:37:03 +00:00
Alan Viverette
43027b7bca Add support for tint and tintMode to GradientDrawable
BUG: 17975498
Change-Id: I8aeec48b8499abaf055e75018759f99801efdecc
2014-10-13 16:55:59 -07:00
Alan Viverette
a7b64e8eef Avoid saveLayer in RippleDrawable if the background won't draw
BUG: 17952941
Change-Id: Ic2640f847e2ed43fc5117d43230513ee7696d9e7
2014-10-13 16:47:57 -07:00
Alan Viverette
2627206e1b Revert "Always project ripples"
Projecting ripples places them under shadows, which is not
ideal. Punting this workaround and waiting until we have
proper support for rounded corner clipping on windows.

This reverts commit f90b6bd54f60960a790b5bd507a0d75d961a981a.

Change-Id: I61946649bbb1bf74a969d74e5353608afc8e4463
2014-10-13 23:18:04 +00:00
Alan Viverette
2f82e48abb Merge "Always project ripples" into lmp-mr1-dev 2014-10-13 20:58:48 +00:00
Alan Viverette
cdd5e067f2 Fix inset drawable's intrinsic size, replace ic_text_dot asset
BUG: 17648301
Change-Id: I8af0f6d1beee7a1cb3a3b9db571ed2c407e24556
2014-10-10 14:08:32 -07:00
Alan Viverette
f90b6bd54f Always project ripples
We already handle bounding rect in draw(), so this just ensures
that ripples are always clipped to window background outlines
until we can implement more general clipping.

BUG: 17498583
Change-Id: Iaff51fb177b017a11822bdf4f31c117fc9522c15
2014-10-09 14:47:19 -07:00
Dianne Hackborn
d83e9e4280 am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '0761b1b5ebb453a411e3289c1c972dbfddcee880':
  Put in real "code" (aka marketing) name.
2014-10-09 13:03:21 +00:00
Alan Viverette
f92f26fef2 Slow down ripple background fade in from press
BUG: 17433613
Change-Id: Ie9c4046532d61ad8ef8e044d14557db5d52e0d0b
2014-10-08 14:49:21 -07:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Alan Viverette
727cae197b Mutate and apply theme if needed before caching themed drawables
This ensures that drawables are completely separated from their cached
constant states before applying a theme. After this, we can remove the
implicit (and incomplete) mutation in the clone constructors.

Also implements missing mutate() method on ClipDrawable.

BUG: 17646144
Change-Id: If0d66b0a85724d76e0a4f506758c7ba3c0aa3410
2014-10-07 15:08:47 -07:00
Alan Viverette
39e33621a7 Fix theme propagation to contained android:drawable elements
BUG: 17790666
Change-Id: I6733a98e779cad0d384b917c57d2b3409a166c02
2014-10-02 15:54:23 -07:00
ztenghui
c3fdffa981 Correct the documentation for VectorDrawable
We missed the alpha for the vector drawable root level in the documentation.
And the animation target can be vector drawable itself for the alpha value,
which is more than path and group object.

b/17696183

Change-Id: Ic9d441fbdf411dad92718ae5adbc6655fe708453
2014-09-30 15:02:24 -07:00
Alan Viverette
b805da9b59 Merge "Fix drawable container tinting" into lmp-dev 2014-09-30 00:32:30 +00:00
Alan Viverette
bddb843e79 Fix drawable container tinting
BUG: 17704311
Change-Id: Ib9ced41e8589352c852e6c9dc7abbe6e4b9f2520
2014-09-29 17:22:47 -07:00
Chris Craik
3f873d8644 Implement alpha as documented for drawables
bug:17693526

With this change, outline opacity isn't published by default, as was
intended. Default behavior for custom drawables is to have a
rectangular outline, but not cast a shadow, e.g. as a button
background.

Change-Id: If80a256ff359bcb58f3f593ec9018f2df5fc4e44
2014-09-29 21:14:43 +00:00
Alan Viverette
b067405bf4 Add callback to track and thumb drawables, propagate state in ASLD
BUG: 17665424
Change-Id: I22da4530f3e2869d856102e804f020461a46fe49
2014-09-26 16:12:16 -07:00
Alan Viverette
5004032ebc Fixed mutate() for RippleDrawable, ASLD, AVD, fix applyTheme in VD
BUG: 17646144
Change-Id: I58c111d86224dc8f7f557073c0bcbc22ad74aa1b
2014-09-26 10:37:30 -07:00
Alan Viverette
33ae07ab81 Merge "Cut ripple background alpha in half" into lmp-dev 2014-09-25 20:14:34 +00:00
Alan Viverette
8bdb442703 Cut ripple background alpha in half
Ripple alpha is supposed to be split evenly between the foreground
ripple layer and the background layer, but the background alpha wasn't
getting adjusted properly.

BUG: 17658817
Change-Id: I7af2f2ed38400a40d4a17da020363c7ae5c71a7b
2014-09-25 13:06:03 -07:00
ztenghui
dde353394c Merge "Fix AVD for CTS failure." into lmp-dev 2014-09-24 23:07:18 +00:00
ztenghui
98916d146a Fix AVD for CTS failure.
Mostly about changingConfig flags, the fix is just a copy from VectorDrawable.

b/17631551

Change-Id: Ibad9c2f61cd86b15e9bca1d1991c8cd147897bb0
2014-09-23 16:07:27 -07:00
ztenghui
dbcccffc37 Fix animation on the some properties
The risk is low since most of them are just matching the naming to xml.
And this update won't cause build breakage.

b/17623982

Change-Id: I1eda0b8314ec7b94bc03976cdc365a7dc1039f4c
2014-09-23 11:22:26 -07:00
Chris Craik
f559326b18 Hide other color filter mutability
bug:17262092
Change-Id: Ia6c0e1a684365c372803d1a6be41a478a05e0dd0
2014-09-19 08:54:09 -07:00
Alan Viverette
238aeca552 Merge "Reduce overdraw after clearing ripples in RippleDrawable" into lmp-dev 2014-09-16 00:37:16 +00:00
ztenghui
9c13ed366f Set cache dirty when re-create the cache bitmap
b/17503595

Change-Id: Icdaa3651345b740772363f8afb29bb36741fcc87
2014-09-15 23:41:34 +00:00
Alan Viverette
2ae5640354 Reduce overdraw after clearing ripples in RippleDrawable
We only need to force a transparent draw after canceling a render
thread accelerated animation, and then we can draw again without
the transparency to avoid overdraw in the display list.

BUG: 17451761
Change-Id: I640f9a29d0940a93802f14a15f27d2c2072755ce
2014-09-15 12:27:13 -07:00
Alan Viverette
264ea9c35f Merge "Apply VectorDrawable color filter at draw time" into lmp-dev 2014-09-12 23:47:55 +00:00
Alan Viverette
b07b086bd4 Apply VectorDrawable color filter at draw time
BUG: 17491152
Change-Id: Ia0ca0bd7cd00363ad5777d3e2e62fa1131a6d8a5
2014-09-12 16:37:44 -07:00
Alan Viverette
6d32576312 Merge "Report button opacity for current state, fix button shadows" into lmp-dev 2014-09-12 23:14:33 +00:00
Alan Viverette
888b4cf73c Report button opacity for current state, fix button shadows
BUG: 17433604
Change-Id: I25e0bd9b96e09ed2a4d85476b60f459e7cc33002
2014-09-12 16:13:32 -07:00
ztenghui
74cc5c39ae Merge "Add root alpha and animation to (Animated)VectorDrawable" into lmp-dev 2014-09-12 22:12:03 +00:00
ztenghui
8490354dc6 Add root alpha and animation to (Animated)VectorDrawable
b/17393626

Change-Id: If6a28b072f7d4bcb2b57022d86ec784f4c0d78f1
2014-09-12 15:11:10 -07:00
Alan Viverette
607bd84826 Update icons to vectors, fix preload theming & vector tinting
Adds a missing JNI binding to AssetManager, ensures drawables have
default tint modes as documented, and updates vector tint appropriately
when state changes.

BUG: 17385604
Change-Id: Ice92885989ebc13b95952f5dc3b7904cc956da12
2014-09-12 13:06:45 -07:00
Chet Haase
25877af238 Merge "Unfilled shapes should not report themselves as opaque" into lmp-dev 2014-09-12 00:54:18 +00:00
Chet Haase
22cf0b0cb8 Unfilled shapes should not report themselves as opaque
Issue #17470611 Stroked, unfilled GradientDrawable shouldn't cast a shadow

Change-Id: Ied60e12c2d2567efec8dac1fe69c77b49ef25b8e
2014-09-11 17:45:43 -07:00
Chris Craik
9bc13a353f Fix null rect parameter for saveLayer / saveLayerAlpha
bug:17476559
Change-Id: I3ba43c9eed8f6fc455eb41e0990e75e0f4c7b648
2014-09-11 16:55:10 -07:00
ztenghui
c96e392765 Merge "Bring back the fillAlpha and strokeAlpha." into lmp-dev 2014-09-11 16:32:37 +00:00
Alan Viverette
87610e535d Merge "Copy opaque over shape in GradientDrawable copy constructor" into lmp-dev 2014-09-11 00:22:10 +00:00
Alan Viverette
c3a63c1fbb Copy opaque over shape in GradientDrawable copy constructor
BUG: 17433604
Change-Id: I8eeba8bd68930db178545a3b25e29c3c45ae1f79
2014-09-10 16:54:02 -07:00
ztenghui
2e17d2b232 Bring back the fillAlpha and strokeAlpha.
At the same time, remove the group alpha since we did not follow the convention
that group's alpha should apply together, not separately to each elements.

b/17393626

Change-Id: Idfc071414213583924961dc8ea760d6fb317873c
2014-09-10 16:26:48 -07:00
Alan Viverette
5aaa7788d5 Merge "Only force drawing in RippleDrawable when necessary" into lmp-dev 2014-09-10 23:26:06 +00:00