summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/AdapterViewAnimator.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-10-14 10:08:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-14 10:08:12 -0700
commit70ea25fa8ac1f2005ec4e69023e05af4a8d9bd4a (patch)
treea64f12e56b35e4f3e2395afcd2a2827861e92ad6 /core/java/android/widget/AdapterViewAnimator.java
parentc50a67b3965a1ed9ffbee4dae736590a167876f5 (diff)
parent41f041d9986f8a5d45b6cb0b86e881c81a412168 (diff)
downloadframeworks_base-70ea25fa8ac1f2005ec4e69023e05af4a8d9bd4a.zip
frameworks_base-70ea25fa8ac1f2005ec4e69023e05af4a8d9bd4a.tar.gz
frameworks_base-70ea25fa8ac1f2005ec4e69023e05af4a8d9bd4a.tar.bz2
Merge "Remove generics from Animator APIs"
Diffstat (limited to 'core/java/android/widget/AdapterViewAnimator.java')
-rw-r--r--core/java/android/widget/AdapterViewAnimator.java36
1 files changed, 20 insertions, 16 deletions
diff --git a/core/java/android/widget/AdapterViewAnimator.java b/core/java/android/widget/AdapterViewAnimator.java
index b7b1a23..b5934b0 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,12 +246,16 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
}
}
- ObjectAnimator<?> getDefaultInAnimation() {
- return new ObjectAnimator<Float>(DEFAULT_ANIMATION_DURATION, null, "alpha", 0.0f, 1.0f);
+ ObjectAnimator getDefaultInAnimation() {
+ ObjectAnimator anim = ObjectAnimator.ofFloat(null, "alpha", 0.0f, 1.0f);
+ anim.setDuration(DEFAULT_ANIMATION_DURATION);
+ return anim;
}
- ObjectAnimator<?> getDefaultOutAnimation() {
- return new ObjectAnimator<Float>(DEFAULT_ANIMATION_DURATION, null, "alpha", 1.0f, 0.0f);
+ ObjectAnimator getDefaultOutAnimation() {
+ ObjectAnimator anim = ObjectAnimator.ofFloat(null, "alpha", 1.0f, 0.0f);
+ anim.setDuration(DEFAULT_ANIMATION_DURATION);
+ return anim;
}
/**
@@ -692,10 +696,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
*
* @return An Animation or null if none is set.
*
- * @see #setInAnimation(android.view.animation.Animation)
+ * @see #setInAnimation(android.animation.ObjectAnimator)
* @see #setInAnimation(android.content.Context, int)
*/
- public ObjectAnimator<?> getInAnimation() {
+ public ObjectAnimator getInAnimation() {
return mInAnimation;
}
@@ -707,7 +711,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;
}
@@ -716,10 +720,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
*
* @return An Animation or null if none is set.
*
- * @see #setOutAnimation(android.view.animation.Animation)
+ * @see #setOutAnimation(android.animation.ObjectAnimator)
* @see #setOutAnimation(android.content.Context, int)
*/
- public ObjectAnimator<?> getOutAnimation() {
+ public ObjectAnimator getOutAnimation() {
return mOutAnimation;
}
@@ -731,7 +735,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;
}
@@ -742,10 +746,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @param resourceID The resource id of the animation.
*
* @see #getInAnimation()
- * @see #setInAnimation(android.view.animation.Animation)
+ * @see #setInAnimation(android.animation.ObjectAnimator)
*/
public void setInAnimation(Context context, int resourceID) {
- setInAnimation((ObjectAnimator<?>) AnimatorInflater.loadAnimator(context, resourceID));
+ setInAnimation((ObjectAnimator) AnimatorInflater.loadAnimator(context, resourceID));
}
/**
@@ -755,10 +759,10 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter>
* @param resourceID The resource id of the animation.
*
* @see #getOutAnimation()
- * @see #setOutAnimation(android.view.animation.Animation)
+ * @see #setOutAnimation(android.animation.ObjectAnimator)
*/
public void setOutAnimation(Context context, int resourceID) {
- setOutAnimation((ObjectAnimator<?>) AnimatorInflater.loadAnimator(context, resourceID));
+ setOutAnimation((ObjectAnimator) AnimatorInflater.loadAnimator(context, resourceID));
}
/**