39 Commits

Author SHA1 Message Date
ztenghui
86ec6088b5 VD:test:Remove open animation AVD
This is for unbundle apps, so it is not a good idea to put in open source.

b/18171696

Change-Id: I4272a9cd12904b90b4421e88304795a292ceec58
2014-11-04 15:59:46 -08:00
ztenghui
897f6daeff Support negative value in exponential data in the pathData.
Now "1e-5" will not be separated as "1e" and "-5".

Add one test for this use case.
Make sure we print out the pathData when path parsing has error.

b/17919923

Change-Id: I10a00ce21166cfb5a009c49c1a93f40eeb956d83
2014-10-10 11:11:34 -07:00
ztenghui
4cc3e2704a Support dot separation as the svg path data did.
Like "0.0.0" will be separated to "0.0 .0" now, just to make sure we are more
complied with svg path data.

b/17892882

Change-Id: Id7b64e9882f5174aa794a0256e2a29d66c724876
2014-10-08 15:51:37 -07:00
ztenghui
6eafdfcd1c More test cases from UX team for AVD.
This adds more realistic avds for testing purpose.
Also add root level alpha tests.

b/17698712

Change-Id: I32efaecf8a46a110c77e432a5307296e8a443160
2014-09-30 17:24:05 -07:00
ztenghui
9d23862bfd Merge "Add one more test and update old tests" into lmp-dev 2014-09-24 23:07:35 +00:00
ztenghui
80f44408a1 Add one more test and update old tests
This is just updating the internal test app.
No real functionality changed.

b/17631551

Change-Id: Icc01e017ea4fbf97712214e6ac02691d29ea5e96
2014-09-23 16:35:53 -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
ztenghui
8490354dc6 Add root alpha and animation to (Animated)VectorDrawable
b/17393626

Change-Id: If6a28b072f7d4bcb2b57022d86ec784f4c0d78f1
2014-09-12 15:11:10 -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
ztenghui
6661341596 Don't double count the left/top when using bitmap cache in VectorDrawable.
bug:16861184

Change-Id: I0530602957a434b222725b6fcbc1af165ee05835
2014-08-11 10:16:22 -07:00
ztenghui
f143ae8ffe Removing fill and stroke opacity
bug:16850076

attrs/public.xml update will be separated for build break friday.

Change-Id: I5863193d5fecd7e210bd6db5294868f1a70e0d2f
2014-08-07 22:48:46 +00:00
ztenghui
d1c89b1dd6 Add stroke related test to the VectorDrawableTest
Change-Id: I7dceebd58d9365cf8e2a31dfeec418aa439bacb6
2014-08-06 18:07:16 +00:00
ztenghui
5eb5cde467 Fix one typo and add linear progress bar in the test.
Change-Id: Ib516fd4a27000d8e69a6640386332140ff0d6fdd
2014-08-04 20:46:20 +00:00
ztenghui
a95c8abb36 API REVIEW: VectorDrawable
- Merge <size> and <viewport> attributes all in to top-level <vector> tag
- Indent attributes under <group> in java doc.
- Updata android:stroke to be android:strokeColor, likewise android:fill
- Instead of android:clipToPath, make this a different clip-path tag.
- Document units of the various attributes
- Add example code for defining a VectorDrawable resource

More than that:
= Refactor the code to better support clipPath as a sub-class.
= Update all the xml files to use the new attributes and clip-path tag.

TODO:
-- Remove clipToPath, since that should happen on build break Friday.

bug:16488254

Change-Id: I6db5680ef83cb26c8f064a60fc7d6e7142974b0f
2014-07-25 23:26:41 +00:00
ztenghui
5a836f74df Add negative sign separation support in the pathData
bug:14585171

Change-Id: I61dec27856be09c44bb1d32ff61b3c3cd458cc34
2014-07-23 21:46:16 +00:00
ztenghui
738177caf6 Add the RTL support to VectorDrawable.
bug:15905631

Change-Id: Ieb3dcac2dd446ba89f307716411688dcd6ec5279
2014-07-17 17:37:19 +00:00
ztenghui
7bc6a3f023 Add more reverse support to AnimatedVD
bug:16162242

Change-Id: Ie0b7618beeb65ebeb65db41600165837524bcee4
2014-07-16 19:26:26 +00:00
ztenghui
8d0d24f7a2 Fix the render order to follow the XML file order.
So we put path and group into a big list, then use reflectiont to handle them
differently.

bug:16162141

Change-Id: I4c84dc952d5d9b49412301dcd6459395e21d3b31
2014-07-10 22:04:20 +00:00
Alan Viverette
f456b1f078 Update AnimatedStateListDrawable to work with Animatable drawables
BUG: 16016730
Change-Id: I6d02a1235c0aecd7e62f12226f3689372d043ddd
2014-07-03 19:03:21 -07:00
ztenghui
9cb5b4c2d9 Use AnimatedVectorDrawable for progress bar.
Change-Id: I419197ef38a611757f27ca3192350ad4bd403875
2014-06-30 12:43:52 -07:00
ztenghui
66d3d8a09e Add string support for valueFrom/valueTo
b/15910407

Change-Id: I557e855f7d16e2eb0452d43ca6a672acdcae2071
2014-06-27 09:05:40 -07:00
ztenghui
1c1cda0c31 Update the tests to show more animations from UX team
Change-Id: I16d2ed29f40c85ec48c87b5a0355e2a262ed3af7
2014-06-27 09:05:40 -07:00
ztenghui
eb034fbca4 AVD now support path morphing.
Basically extended the ValueAnimator to support a new type: pathType.
Add the PathDataEvaluator internally to interpolate path data.
Update test to show the path morphing.

Change-Id: I89db0199cbc12e3041790a6115f3f50b80213cdb
2014-06-20 15:16:47 -07:00
ztenghui
cf4832f69c Add path support into xml files for PathInterpolator and ObjectAnimator.
The test case is showing that AnimatedVectorDrawable is able to use path to
define time interpolator and object movement now.

Change-Id: If3c0418265d0fd762c8f5f0bb8c39cce3ad34ef3
2014-06-19 10:56:28 -07:00
ztenghui
16c1bd5db8 Improve constant state for VectorDrawable
Now inflation will not cause duplicated constant states.
    And update tests.

Change-Id: I66861e5451c4c10d18756e8522546ea1cb938a55
2014-06-18 12:55:22 -07:00
ztenghui
e5e92602a4 Add AnimatedVectorDrawable
Currently as a hidden class.
It can support many the animations now as far as ObjectAnimator and
hierarchical group can support.
And we don't have path morphing yet.

Also support the Animator / Interpolator inflation from Context and Resources.

Change-Id: I948bbdf7373ad291171eed0b497959dce8c2edf3
2014-06-12 13:18:59 -07:00
ztenghui
7ac18b8445 Add AnimationDrawable test
Change-Id: Ieabd1f628cdccd4939f733f92c0cbefbf8bc0446
2014-06-03 14:26:29 -07:00
ztenghui
2af745b56c Handle the alpha in the group setting and fix the fill issue.
The fill used to be dafault as "none".
Now it is default to opaque black, which is consistent with svg now.
So it is better to always set the fill value.

bug:15288554

Change-Id: I07ac41c5adc77665e66e52f2c0220139586fb09b
2014-06-03 10:54:14 -07:00
ztenghui
4d24caf1de Add the tree hierarchy for the group
bug:15288554

Change-Id: I7caedb8466d078a0d9a6148e00d02eded4a4d234
2014-06-02 17:18:10 -07:00
ztenghui
452f6ece7f Add translation and scale to the group tag and related tests.
bug:15288554

Change-Id: Iebe176d0a9c2c566d1910674a068e65e15569829
2014-05-28 13:22:44 -07:00
ztenghui
63cfd85bcc Move the rotation information from path to group.
Also update the 3rd test to correctly testing clipping.

Removing some naive tests which rotate 360 or 0.

bug:15288554

Change-Id: I436e8e494cb78fc665a3890171a1af87367db419
2014-05-28 09:31:19 -07:00
ztenghui
6d9c422de5 Bring the group tag back to VectorDrawable.
This is the first step, including:
1. Bring the group tag back by reverting.
2. If there is no group tag, then treat all the paths as a single group.
Make sure our test cases covering both cases.

At the same time, fix one tiny UI bug in the test.

TODO:
1. Move the rotation to the group tag.
2. Add translation/scale to the group tag.
3. Convert the group into a tree hierarchy.

This reverts commit 404211630ba3bb865109434aba4433e7541b39d3.

Conflicts:
	graphics/java/android/graphics/drawable/VectorDrawable.java

Change-Id: Ife65bb6a7fc85f9947124b8e356cd5b82119796a
2014-05-27 10:15:52 -07:00
ztenghui
46e546c28f Remove the group tag.
Since we don't support animation, it is better not to expose the group tag for now,
which will only lead to confusion.
Internally, we keep the group class to represent multiple paths. But we don't
allow multiple groups.

Change-Id: I041ba32dff05ef6b1cd9d5ab1a1717e55a356145
2014-05-12 10:54:11 -07:00
ztenghui
ddbbb8ae85 Further cleaning on animated part of VectorDrawable.
State changed support is gone.
Rename VAnimatedPath.
Remove the obsolete documents.
Update the tests to reflect the API changes.

Change-Id: Icdc19c6519a4e29975877c1d167e61c8fa14a371
2014-05-08 10:16:34 -07:00
ztenghui
589e7b40be Format the xml files for the VectorDrawableTest
All automatically done by the tool.
No real changes.

Change-Id: I8a98be9441d7cb0b3636c2a850d1e7de9e79394f
2014-04-24 10:13:07 -07:00
Alan Viverette
4b1a7c203d Fix build breakage
Change-Id: I73d9ff5f38986b7acf83b85c1989203f472bc5fd
2014-04-10 14:28:30 -07:00
Alan Viverette
4b3988d159 Cleaning up VectorDrawable
Use argb evaluation method from animation package, lazily create paint,
set default for stroke line cap and join. Fix scaling to bounds. Fix
drawable in test app.

Change-Id: I245d5d6acc6ba9806743ab2bf9bf99aff3649c39
2014-04-10 11:21:15 -07:00
Alan Viverette
7f1ab7a43f Theming for more VectorDrawable attrs, add attrs to test app
BUG: 13878079
Change-Id: Ibcc8d67446c44cd8f681230fc484c7dc7411ffab
2014-04-08 17:12:43 -07:00
ztenghui
fba3bad387 Clean up on VectorDrawable.
Rename the test from DynamicDrawableTest to VectorDrawableTest.
Remove duplicate function calls in the test.
Fix comments in VectorDrawable

Change-Id: I1ef87137088ccc10b1abdb40ca368345d9dbadab
2014-04-02 17:31:08 -07:00