This will make the reproducing and isolating the bug easier b/c everything is
in one single file.
b/27343522
Change-Id: I25445127f6fb44a8613701a7195a605e052730e5
Add ComplexColor interface for both GradientColor and ColorStateList.
Set up constant state, factory, theme attrs for GradientColor, while
refactoring the ColorStateList's similar code. (Functionality in CSL should
be the same).
Support themeing in both the root and item level in GradientColor.
For example, both startColor in <gradient> tag or color in <item> tag can
have theme color.
Add tests for both simple and complex cases with themeing etc.
Hook up the native VectorDrawable implementation using 2 extra JNI calls for
simplicity. Such calls only happen at inflate and applyTheme call.
b/22564318
Change-Id: Ibdc564ddb4a7ee0133c6141c4784782f0c93ce0e
Removes unnecessary invalidateSelf() from VD.onStateChange(). This is
handled by the view hosting the drawable.
Bug: 22984152
Change-Id: Idf11a0ffef392cb1d8452aa3f5f836b35027a756
Before, the VectorDrawable is behaving like BitmapDrawable inside a ImageView,
and it can be blurry due to scaling.
Now apply the scaling information to the cached bitmap, then the size of bitmap
will match the ImageView's screen size. Therefore, no blurry any more.
b/18185626
Change-Id: I979cef3b5178a9bd37ee6cc776df3361ca47c803
Since 2 clip paths is taking the intersection as the final clip, we should
separate this test case into 2 groups.
Prior to M release, the 2nd clip path is overriding the first one.
The behavior changed in this CL:
e9c01a40a2f0f0da195dfbb2909aaee5c005d1c6
b/16376848
b/19946683
Change-Id: Ib21c95e70f1317321725acbbe0ccf91713f748c3
This crashes while trying to run due to the '?attr/color1' reference inside
res/anim/blink.xml
Bug: 20817800
Change-Id: Ie3ea24ac9b22e69af152d6ffe87c8c953929299c
Originally, stroke width is independent of group scaling.
But that is a bug and causing animation trouble.
b/19501782
Change-Id: I33d5e44f2f8b2a82fee1a5a326223a39aaffa86c
Such that UX team has less pain on building the VD / AVD assets.
This also requires removing internal API dependence in the test.
To build the VectorDrawableTest with prebuilt SDK.
<root dir>/tapas VectorDrawableTest
<root dir>/make -j64 showcommand
Then later for incremental build.
<root dir>/mmm ./frameworks/base/tests/VectorDrawableTest/ -j20
b/18260896
Change-Id: Id559074df78d7c2a5c529c545834da23986bc15f
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
We have to cache the starting point for the latest "move", then apply it after
we close the path.
b/18214929
Change-Id: I8e8e5c810d720a1c194b8f59d74867a0efbb7662
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
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
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
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
- 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
So we put path and group into a big list, then use reflectiont to handle them
differently.
bug:16162141
Change-Id: I4c84dc952d5d9b49412301dcd6459395e21d3b31
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
The test case is showing that AnimatedVectorDrawable is able to use path to
define time interpolator and object movement now.
Change-Id: If3c0418265d0fd762c8f5f0bb8c39cce3ad34ef3