summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/AdapterViewAnimator.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-10-14 10:13:53 -0700
committerRomain Guy <romainguy@google.com>2010-10-14 10:13:53 -0700
commit83d6e8213230fb0805aa019d266842253baeb114 (patch)
tree2d3b230eee1a9645c8f2c93e5e32e3ea906d9b20 /core/java/android/widget/AdapterViewAnimator.java
parent70ea25fa8ac1f2005ec4e69023e05af4a8d9bd4a (diff)
downloadframeworks_base-83d6e8213230fb0805aa019d266842253baeb114.zip
frameworks_base-83d6e8213230fb0805aa019d266842253baeb114.tar.gz
frameworks_base-83d6e8213230fb0805aa019d266842253baeb114.tar.bz2
Revert "Remove generics from Animator APIs"
This reverts commit 41f041d9986f8a5d45b6cb0b86e881c81a412168.
Diffstat (limited to 'core/java/android/widget/AdapterViewAnimator.java')
-rw-r--r--core/java/android/widget/AdapterViewAnimator.java36
1 files changed, 16 insertions, 20 deletions
diff --git a/core/java/android/widget/AdapterViewAnimator.java b/core/java/android/widget/AdapterViewAnimator.java
index b5934b0..b7b1a23 100644
--- a/core/java/android/widget/AdapterViewAnimator.java
+++ b/core/java/android/widget/AdapterViewAnimator.java
@@ -138,8 +138,8 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
/**
* In and out animations.
*/
- ObjectAnimator mInAnimation;
- ObjectAnimator mOutAnimation;
+ ObjectAnimator<?> mInAnimation;
+ ObjectAnimator<?> mOutAnimation;
private ArrayList<View> mViewsToBringToFront;
@@ -246,16 +246,12 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
}
}
- ObjectAnimator getDefaultInAnimation() {
- ObjectAnimator anim = ObjectAnimator.ofFloat(null, "alpha", 0.0f, 1.0f);
- anim.setDuration(DEFAULT_ANIMATION_DURATION);
- return anim;
+ ObjectAnimator<?> getDefaultInAnimation() {
+ return new ObjectAnimator<Float>(DEFAULT_ANIMATION_DURATION, null, "alpha", 0.0f, 1.0f);
}
- ObjectAnimator getDefaultOutAnimation() {
- ObjectAnimator anim = ObjectAnimator.ofFloat(null, "alpha", 1.0f, 0.0f);
- anim.setDuration(DEFAULT_ANIMATION_DURATION);
- return anim;
+ ObjectAnimator<?> getDefaultOutAnimation() {
+ return new ObjectAnimator<Float>(DEFAULT_ANIMATION_DURATION, null, "alpha", 1.0f, 0.0f);
}
/**
@@ -696,10 +692,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
*
* @return An Animation or null if none is set.
*
- * @see #setInAnimation(android.animation.ObjectAnimator)
+ * @see #setInAnimation(android.view.animation.Animation)
* @see #setInAnimation(android.content.Context, int)
*/
- public ObjectAnimator getInAnimation() {
+ public ObjectAnimator<?> getInAnimation() {
return mInAnimation;
}
@@ -711,7 +707,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @see #getInAnimation()
* @see #setInAnimation(android.content.Context, int)
*/
- public void setInAnimation(ObjectAnimator inAnimation) {
+ public void setInAnimation(ObjectAnimator<?> inAnimation) {
mInAnimation = inAnimation;
}
@@ -720,10 +716,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
*
* @return An Animation or null if none is set.
*
- * @see #setOutAnimation(android.animation.ObjectAnimator)
+ * @see #setOutAnimation(android.view.animation.Animation)
* @see #setOutAnimation(android.content.Context, int)
*/
- public ObjectAnimator getOutAnimation() {
+ public ObjectAnimator<?> getOutAnimation() {
return mOutAnimation;
}
@@ -735,7 +731,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @see #getOutAnimation()
* @see #setOutAnimation(android.content.Context, int)
*/
- public void setOutAnimation(ObjectAnimator outAnimation) {
+ public void setOutAnimation(ObjectAnimator<?> outAnimation) {
mOutAnimation = outAnimation;
}
@@ -746,10 +742,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @param resourceID The resource id of the animation.
*
* @see #getInAnimation()
- * @see #setInAnimation(android.animation.ObjectAnimator)
+ * @see #setInAnimation(android.view.animation.Animation)
*/
public void setInAnimation(Context context, int resourceID) {
- setInAnimation((ObjectAnimator) AnimatorInflater.loadAnimator(context, resourceID));
+ setInAnimation((ObjectAnimator<?>) AnimatorInflater.loadAnimator(context, resourceID));
}
/**
@@ -759,10 +755,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @param resourceID The resource id of the animation.
*
* @see #getOutAnimation()
- * @see #setOutAnimation(android.animation.ObjectAnimator)
+ * @see #setOutAnimation(android.view.animation.Animation)
*/
public void setOutAnimation(Context context, int resourceID) {
- setOutAnimation((ObjectAnimator) AnimatorInflater.loadAnimator(context, resourceID));
+ setOutAnimation((ObjectAnimator<?>) AnimatorInflater.loadAnimator(context, resourceID));
}
/**