diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2015-12-15 11:01:27 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2016-01-27 16:32:42 -0800 |
commit | dbee9bb342cdfaa5155b1918f90262c05e2464cb (patch) | |
tree | e68cae3989cba8f981c6c9ae66eb068f7422ac29 /tests/VectorDrawableTest/src | |
parent | c0b2f09a92c7ba2437e390a0d075790d8ece3f3d (diff) |
Gradient for VectorDrawable's fill and stroke
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
Diffstat (limited to 'tests/VectorDrawableTest/src')
-rw-r--r-- | tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java index b4a93f68f6c9..a7da286ac6ab 100644 --- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java +++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java @@ -35,6 +35,10 @@ import java.text.DecimalFormat; public class VectorDrawablePerformance extends Activity { private static final String LOGCAT = "VectorDrawable1"; protected int[] icon = { + R.drawable.vector_icon_gradient_1, + R.drawable.vector_icon_gradient_2, + R.drawable.vector_icon_gradient_3, + R.drawable.vector_icon_state_list, R.drawable.vector_drawable01, R.drawable.vector_drawable02, R.drawable.vector_drawable03, @@ -102,7 +106,7 @@ public class VectorDrawablePerformance extends Activity { ScrollView scrollView = new ScrollView(this); GridLayout container = new GridLayout(this); scrollView.addView(container); - container.setColumnCount(5); + container.setColumnCount(4); Resources res = this.getResources(); container.setBackgroundColor(0xFF888888); VectorDrawable []d = new VectorDrawable[icon.length]; |