aboutsummaryrefslogtreecommitdiff
path: root/testapps/customPropAnimTest/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'testapps/customPropAnimTest/src/com/android')
-rw-r--r--testapps/customPropAnimTest/src/com/android/custompropertyanimation/CustomPropertyAnimationActivity.java22
-rw-r--r--testapps/customPropAnimTest/src/com/android/custompropertyanimation/MyView.java24
2 files changed, 46 insertions, 0 deletions
diff --git a/testapps/customPropAnimTest/src/com/android/custompropertyanimation/CustomPropertyAnimationActivity.java b/testapps/customPropAnimTest/src/com/android/custompropertyanimation/CustomPropertyAnimationActivity.java
new file mode 100644
index 000000000..b1b91b981
--- /dev/null
+++ b/testapps/customPropAnimTest/src/com/android/custompropertyanimation/CustomPropertyAnimationActivity.java
@@ -0,0 +1,22 @@
+package com.android.custompropertyanimation;
+
+import android.animation.ObjectAnimator;
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.LinearLayout;
+
+public class CustomPropertyAnimationActivity extends Activity {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ LinearLayout container = (LinearLayout) findViewById(R.id.container);
+
+ MyView view = new MyView(this);
+ container.addView(view);
+
+ ObjectAnimator anim = ObjectAnimator.ofFloat(view, "foo", 1);
+ anim.start();
+ }
+} \ No newline at end of file
diff --git a/testapps/customPropAnimTest/src/com/android/custompropertyanimation/MyView.java b/testapps/customPropAnimTest/src/com/android/custompropertyanimation/MyView.java
new file mode 100644
index 000000000..e557fdaa5
--- /dev/null
+++ b/testapps/customPropAnimTest/src/com/android/custompropertyanimation/MyView.java
@@ -0,0 +1,24 @@
+package com.android.custompropertyanimation;
+
+import android.content.Context;
+import android.view.View;
+
+public class MyView extends View {
+
+ float mFoo = 0;
+
+ public MyView(Context context) {
+ super(context);
+ }
+
+ public void setFoo(float foo) {
+ System.out.println("foo = " + foo);
+ mFoo = foo;
+ }
+
+ public float getFoo() {
+ System.out.println("getFoo() returning " + mFoo);
+ return mFoo;
+ }
+
+}