2171 Commits

Author SHA1 Message Date
ztenghui
002bc81088 Merge "ASLD: ASLD's XML reversible flag can turn off the reverse behavior now." into lmp-mr1-dev 2014-11-20 23:11:38 +00:00
ztenghui
5b84eace6c ASLD: ASLD's XML reversible flag can turn off the reverse behavior now.
Previously, the android:reversible flag behaves like a suggestion.
Now it is used to enforce no reverse when set to false. In this way, user can
safely setup one direction animation only.
When set to true, but AVD can't reverse , then it will show a warning.

At the same time, update the tests to show different cases, including
AnimationDrawable.

b/18413484

Change-Id: I5552c49dcbd76b0724b4d5593bce8388b27bd905
2014-11-20 14:41:33 -08:00
Chris Craik
93ef96395a Merge "Improve ColorMatrix docs" into lmp-mr1-dev 2014-11-20 21:39:47 +00:00
Chris Craik
db7cc60eb2 Improve ColorMatrix docs
bug:18415632

Clean up some text, and add a sample.

Change-Id: I39fdda2004e1932831058701f95f67355786ad9d
2014-11-20 13:28:01 -08:00
Raph Levien
505ffe3633 Merge "Check bounds on CharSequence drawText methods" into lmp-mr1-dev 2014-11-14 20:54:29 +00:00
Alan Viverette
0c24237686 Merge "Set current degrees when updating RotateDrawable from typed array" into lmp-mr1-dev 2014-11-14 01:52:14 +00:00
Alan Viverette
d03963ce36 Set current degrees when updating RotateDrawable from typed array
This regressed after enabling theming in RotateDrawable.

BUG: 18288235
Change-Id: I61a7b2c178253ed2d550fa0636e27e021ac9eb64
2014-11-13 15:14:36 -08:00
Chris Craik
6b3bf0ceef Merge "Add offset method to Outline" into lmp-mr1-dev 2014-11-13 22:46:22 +00:00
Chris Craik
0e12fa12cb Add offset method to Outline
Also clean up offset docs in Path

Change-Id: Ieca02611d32acce726efba652ae1969340a55a76
2014-11-12 16:17:33 -08:00
Chris Craik
075b2b4ff9 Merge "Add details and performance warnings to save flag docs" into lmp-mr1-dev 2014-11-13 00:05:59 +00:00
Raph Levien
d82f8a9a38 Check bounds on CharSequence drawText methods
The canvas drawText() methods on CharSequence arguments didn't check
whether the start and end offsets were within bounds, which triggered
native crashes. This patch checks the bounds and throws
IndexOutOfBoundsException when invalid.

Bug: 18282500
Change-Id: I1935bf21f828b960c817b40ebce6affd4ce8bb99
2014-11-12 15:05:16 -08:00
Alan Viverette
667ec63c9e Merge "Don't propagate AnimatedStateListDrawable state change to super()" into lmp-mr1-dev 2014-11-12 22:19:06 +00:00
Rob Tsuk
41a8043b30 Merge "Add a way to override Xfermode DO NOT MERGE" into lmp-mr1-dev 2014-11-12 21:42:00 +00:00
ztenghui
ffcb5e210a Merge "AVD: Requires all animator has stopped before start again." into lmp-mr1-dev 2014-11-12 20:47:45 +00:00
Rob Tsuk
4678dcc552 Add a way to override Xfermode DO NOT MERGE
Add a non-public API to Canvas/GLES20Canvas to provide a way to draw
the touch ripple animation without using a save layer.

Change-Id: I6e2095adffe515194f669fb75bb67abf813bd518
2014-11-12 12:25:24 -08:00
Alan Viverette
f9afb46bf7 Fix default attributes in ScaleDrawable
Reverts default scales to correct value of -1, uses existing state
values when updating from typed array.

BUG: 18351309
Change-Id: I45d21fe017a7bea10e3cbda50f6db65d053aa2ec
2014-11-12 10:24:40 -08:00
Alan Viverette
2d91f63ec2 Don't propagate AnimatedStateListDrawable state change to super()
Also updates child element inflation code in AnimationDrawable so
that color resources can be used in the <item> drawable attribute.

BUG: 18322272
Change-Id: I8d13643c5cbdb76d69634a7bac3cead9e9fba4e8
2014-11-11 19:12:32 -08:00
Alan Viverette
b724314516 Merge "Reduce number of saveLayer calls in RippleDrawable" into lmp-mr1-dev 2014-11-12 02:04:22 +00:00
Chris Craik
f37a364a53 Add details and performance warnings to save flag docs
bug:18239290

Change-Id: I5f73bf3f1bf01c8db6ab085b182b14348e47fb3e
2014-11-11 17:37:04 -08:00
ztenghui
1a40facbfd AVD: Requires all animator has stopped before start again.
We should treat all the animator as a group, we should not start again unless
all the previous animations have stopped.

b/18320770

Change-Id: I5b0c2c165cd314745ee6c7152aea3c666e9dff10
2014-11-10 15:03:59 -08:00
Alan Viverette
cc3c573334 Reduce number of saveLayer calls in RippleDrawable
Removes an extra saveLayer call by rendering ripples as overlapping. We
are now down to zero saveLayers when drawing unmasked ripples or ripples
masked against opaque content/masks, one saveLayer for ripples masked
against content and two saveLayers when masked against an explicit mask
layer.

BUG: 18226391
Change-Id: I0fc09d21fbc462fbcfe4c26fc7b18737f584043e
2014-11-07 15:31:16 -08:00
Alan Viverette
d6570d11e4 Support theme attributes in StateListDrawable <item> element
Also adds support for specifying drawable as a color since getDrawable()
automatically wraps colors to ColorDrawable. Does not currently allow
themed item elements to be used in Zygote preload, but we can add that
at some point in the future.

BUG: 18208662
Change-Id: I4c9721ffd100da4b9db7743a46c914828b943dae
2014-11-06 13:50:22 -08:00
Alan Viverette
b4f8a98176 Default gradient radius to %p when no intrinsic width or height set
BUG: 18224018
Change-Id: I05cbe3023d0a5e6813658063d3a3633c6ddd8d96
2014-11-03 18:45:23 -08:00
Svet Ganov
fce84f035c Crash apps that print malformed or password protected PDFs.
If apps are writing malformed content (typically not a PDF file) or if the
PDF content they provide to the print system is password protected, are now
crashed as both of these are app bugs.

bug:17636435

Change-Id: Ifce6a3199e587448dd38f6a84290a965c24b698b
2014-11-01 00:06:08 +00:00
Svetoslav
93134ce87e Merge "Save to a PDF file should look like print preview." into lmp-mr1-dev 2014-10-31 19:54:05 +00:00
Svetoslav
bec22beb99 Save to a PDF file should look like print preview.
When rendering a PDF file for print preview we take into account
the selected print options such as paper size, orientation, etc
without modifying the document. To print we send the doc in its
original form and the print options so the print service can apply
the necessary transforms in addition to the optional custom options
it supports. When saving to PDF we have to actually change the
document as we act as a print service.

bug:13545980

Change-Id: Icdcecf962bec6ff742cc6015df5af9d9086ce760
2014-10-31 10:41:34 -07:00
Alan Viverette
7f4a63d1eb Ensure we don't pass null values in to Theme.resolveAttributes
BUG: 18182274
Change-Id: I08acf877cb81478cc205254edf92a31fcf05991d
2014-10-30 10:29:03 -07:00
Alan Viverette
425b1dc88c Merge "Add theme and config change support to more Drawable types" into lmp-mr1-dev 2014-10-30 00:24:28 +00:00
Alan Viverette
d21fd9d1cc Add theme and config change support to more Drawable types
BUG: 16045735
Change-Id: Ic03173a1c1779c1bb545c4c389f77afed97011ee
2014-10-29 10:24:42 -07:00
Alan Viverette
969ca91acd Clean up GradientDrawable styled attributes, fix useLevelForShape
BUG: 18117976
Change-Id: Iff2ea392204346f68ea47d577e442d398114e5d8
2014-10-24 12:25:04 -07:00
Yigit Boyar
d422dc358f Added a generic configuration and theme based cache
For now, only animators use it but we can consider migrating
drawable cache to it as well.

Bug: 17456416
Change-Id: I571b96856805edb171f0fc52e6bff5a365f46b70
2014-10-23 11:46:01 -07:00
Alan Viverette
7c133e19dd Merge "Fix gradient drawable radius when specified as float, dimension" into lmp-mr1-dev 2014-10-21 18:25:01 +00:00
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
2efbe9816e Fix gradient drawable radius when specified as float, dimension
BUG: 18070756
Change-Id: I991ff792c376c9695a007f8f1187390ab5ff6e3c
2014-10-21 11:04:04 -07: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