diff options
author | ztenghui <ztenghui@google.com> | 2014-05-05 16:26:22 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2014-05-05 17:27:24 -0700 |
commit | 498213a265e05134b4a4fbf93dce69de1a47973c (patch) | |
tree | b7e3ac490cefbc916c55dd84c60f37507c06b2bc /tests | |
parent | 9f5957989ef8d1e2219b624d731acfbf61a366d2 (diff) | |
download | frameworks_base-498213a265e05134b4a4fbf93dce69de1a47973c.zip frameworks_base-498213a265e05134b4a4fbf93dce69de1a47973c.tar.gz frameworks_base-498213a265e05134b4a4fbf93dce69de1a47973c.tar.bz2 |
First step on API cleaning on the VectorDrawable to disable animation support
Cleaning on the API level, and related tests.
The animated icon will be only showing the initial state.
TODO: Deep clean on the functionality part and attributes.
Change-Id: I5723bc5b64f796c3a273d74bde02095751160a88
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(); - } } |