OSDN Git Service

Clean up on VectorDrawable.
authorztenghui <ztenghui@google.com>
Wed, 2 Apr 2014 23:35:24 +0000 (16:35 -0700)
committerztenghui <ztenghui@google.com>
Thu, 3 Apr 2014 00:31:08 +0000 (17:31 -0700)
Rename the test from DynamicDrawableTest to VectorDrawableTest.
Remove duplicate function calls in the test.
Fix comments in VectorDrawable

Change-Id: I1ef87137088ccc10b1abdb40ca368345d9dbadab

42 files changed:
graphics/java/android/graphics/drawable/VectorDrawable.java
tests/DynamicDrawableTest/lint.xml [deleted file]
tests/VectorDrawableTest/Android.mk [moved from tests/DynamicDrawableTest/Android.mk with 94% similarity]
tests/VectorDrawableTest/AndroidManifest.xml [moved from tests/DynamicDrawableTest/AndroidManifest.xml with 99% similarity]
tests/VectorDrawableTest/res/drawable-hdpi/icon.png [moved from tests/DynamicDrawableTest/res/drawable-hdpi/icon.png with 100% similarity]
tests/VectorDrawableTest/res/drawable/icon.png [moved from tests/DynamicDrawableTest/res/drawable/icon.png with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable01.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable01.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable02.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable02.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable03.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable03.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable04.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable04.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable05.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable05.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable06.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable06.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable07.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable07.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable08.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable08.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable09.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable09.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable10.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable10.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable11.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable11.xml with 98% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable12.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable12.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable13.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable13.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable14.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable14.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable15.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable15.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable16.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable16.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable17.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable17.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable18.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable18.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable19.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable19.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_drawable20.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_drawable20.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_icon_create.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_icon_create.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_icon_delete.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_icon_heart.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_icon_schedule.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_icon_settings.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_icon_settings.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_test01.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_test01.xml with 100% similarity]
tests/VectorDrawableTest/res/drawable/vector_test02.xml [moved from tests/DynamicDrawableTest/res/drawable/vector_test02.xml with 100% similarity]
tests/VectorDrawableTest/res/values/strings.xml [moved from tests/DynamicDrawableTest/res/values/strings.xml with 100% similarity]
tests/VectorDrawableTest/res/values/styles.xml [moved from tests/DynamicDrawableTest/res/values/styles.xml with 100% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java with 98% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java with 98% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java with 100% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java with 99% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java with 100% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java with 100% similarity]
tests/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java [moved from tests/DynamicDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java with 100% similarity]

index b2e7fda..33683ab 100644 (file)
@@ -61,9 +61,9 @@ import java.util.HashSet;
  * <p/>
  * <dl>
  * <dt><code>&lt;vector></code></dt>
- * <dd> * The attribute <code>android:trigger</code> defines a state change that
+ * <dd>The attribute <code>android:trigger</code> defines a state change that
  * will drive the animation </dd>
- * <dd> * The attribute <code>android:versionCode</code> defines the version of
+ * <dd>The attribute <code>android:versionCode</code> defines the version of
  * VectorDrawable </dd>
  * <dt><code>&lt;size></code></dt>
  * <dd>Used to defined the intrinsic Width Height size of the drawable using
diff --git a/tests/DynamicDrawableTest/lint.xml b/tests/DynamicDrawableTest/lint.xml
deleted file mode 100644 (file)
index ee0eead..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<lint>
-</lint>
\ No newline at end of file
similarity index 94%
rename from tests/DynamicDrawableTest/Android.mk
rename to tests/VectorDrawableTest/Android.mk
index 5c51301..dd8a4d4 100644 (file)
@@ -19,7 +19,7 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
-LOCAL_PACKAGE_NAME := DynamicDrawableTest
+LOCAL_PACKAGE_NAME := VectorDrawableTest
 
 LOCAL_MODULE_TAGS := tests
 
similarity index 99%
rename from tests/DynamicDrawableTest/AndroidManifest.xml
rename to tests/VectorDrawableTest/AndroidManifest.xml
index 4ca3e3c..06effe2 100644 (file)
@@ -73,7 +73,7 @@
             </intent-filter>
 
         </activity>
-        
+
         <activity
             android:name="VectorCheckbox"
             android:label="On a Checkbox" >
@@ -29,7 +29,7 @@
             android:pathData="M 20.28125,2.0000002 C 17.352748,2.0000002 15,4.3527485 15,7.2812502 L 15,8.0000002 L 13.15625,8.0000002 C 9.7507553,8.0000002 7,10.750759 7,14.15625 L 7,39.84375 C 7,43.24924 9.7507558,46 13.15625,46 L 33.84375,46 C 37.249245,46 39.999999,43.24924 40,39.84375 L 40,14.15625 C 40,10.75076 37.249243,8.0000002 33.84375,8.0000002 L 32,8.0000002 L 32,7.2812502 C 32,4.3527485 29.647252,2.0000002 26.71875,2.0000002 L 20.28125,2.0000002 z"
             android:fill="#3388ff"
             android:stroke="#ff8833"
-            android:strokeWidth="1" 
+            android:strokeWidth="1"
             android:rotation="0"/>
          <path
             android:name="spark"
@@ -60,7 +60,6 @@ public class VectorCheckbox extends Activity {
             CheckBox checkBox = new CheckBox(this);
             bArray[i] = checkBox;
             checkBox.setWidth(200);
-            checkBox.setWidth(200);
             checkBox.setButtonDrawable(icon[i]);
             container.addView(checkBox);
         }
@@ -59,7 +59,6 @@ public class VectorDrawable01 extends Activity implements View.OnClickListener {
             Button button = new Button(this);
             bArray[i] = button;
             button.setWidth(200);
-            button.setWidth(200);
             button.setBackgroundResource(icon[i]);
             container.addView(button);
             button.setOnClickListener(this);
@@ -74,7 +74,6 @@ public class VectorDrawablePerformance extends Activity implements View.OnClickL
         for (int i = 0; i < icon.length; i++) {
             Button button = new Button(this);
             button.setWidth(200);
-            button.setWidth(200);
             button.setBackgroundResource(icon[i]);
             container.addView(button);
             button.setOnClickListener(this);