diff options
author | ztenghui <ztenghui@google.com> | 2014-05-06 17:12:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-06 17:12:34 +0000 |
commit | 0b3a7061881d0ea7ba6e3027d599076dc0e9ecc9 (patch) | |
tree | afb9658f3855e49be3ef0d33d16732449864cc43 /tests | |
parent | ebb9e69513b690881a5bad7bf45c6f32e0fc7062 (diff) | |
parent | 498213a265e05134b4a4fbf93dce69de1a47973c (diff) | |
download | frameworks_base-0b3a7061881d0ea7ba6e3027d599076dc0e9ecc9.zip frameworks_base-0b3a7061881d0ea7ba6e3027d599076dc0e9ecc9.tar.gz frameworks_base-0b3a7061881d0ea7ba6e3027d599076dc0e9ecc9.tar.bz2 |
Merge "First step on API cleaning on the VectorDrawable to disable animation support"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java | 20 | ||||
-rw-r--r-- | tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java | 9 |
2 files changed, 2 insertions, 27 deletions
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java index 88ae398..7ba01b1 100644 --- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java +++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java @@ -22,7 +22,7 @@ import android.widget.Button; import android.widget.GridLayout; @SuppressWarnings({"UnusedDeclaration"}) -public class VectorDrawable01 extends Activity implements View.OnClickListener { +public class VectorDrawable01 extends Activity { private static final String LOGCAT = "VectorDrawable1"; int[] icon = { R.drawable.vector_drawable01, @@ -61,28 +61,10 @@ public class VectorDrawable01 extends Activity implements View.OnClickListener { button.setWidth(200); button.setBackgroundResource(icon[i]); container.addView(button); - button.setOnClickListener(this); } - Button b = new Button(this); - b.setText("Run All"); - b.setOnClickListener(new View.OnClickListener(){ - @Override - public void onClick(View v) { - for (int i = 0; i < bArray.length; i++) { - VectorDrawable d = (VectorDrawable) bArray[i].getBackground(); - d.start(); - } - }}); - container.addView(b); setContentView(container); } - @Override - public void onClick(View v) { - VectorDrawable d = (VectorDrawable) v.getBackground(); - d.start(); - } - } diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java index 3929298..b918cdd 100644 --- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java +++ b/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java @@ -25,7 +25,7 @@ import android.widget.ScrollView; import java.text.DecimalFormat; @SuppressWarnings({"UnusedDeclaration"}) -public class VectorDrawablePerformance extends Activity implements View.OnClickListener { +public class VectorDrawablePerformance extends Activity { private static final String LOGCAT = "VectorDrawable1"; protected int[] icon = { R.drawable.vector_drawable01, @@ -76,7 +76,6 @@ public class VectorDrawablePerformance extends Activity implements View.OnClickL button.setWidth(200); button.setBackgroundResource(icon[i]); container.addView(button); - button.setOnClickListener(this); } setContentView(scrollView); time = android.os.SystemClock.elapsedRealtimeNanos()-time; @@ -85,10 +84,4 @@ public class VectorDrawablePerformance extends Activity implements View.OnClickL t.setBackgroundColor(0xFF000000); container.addView(t); } - - @Override - public void onClick(View v) { - VectorDrawable d = (VectorDrawable) v.getBackground(); - d.start(); - } } |