summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJean-Baptiste Queru <>2009-03-25 15:05:51 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-25 15:05:51 -0700
commit8b0662878eae69ab62e859b07165f086ea65cad5 (patch)
tree081184f98b8dcab0823e33978cb9ee26201fb5ec /core
parentafbf448b7d04abe25497f838c1df5d05048f9d12 (diff)
downloadframeworks_base-8b0662878eae69ab62e859b07165f086ea65cad5.zip
frameworks_base-8b0662878eae69ab62e859b07165f086ea65cad5.tar.gz
frameworks_base-8b0662878eae69ab62e859b07165f086ea65cad5.tar.bz2
Automated import from //branches/master/...@142574,142574
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/animation/AccelerateDecelerateInterpolator.java1
-rw-r--r--core/java/android/view/animation/AccelerateInterpolator.java15
-rw-r--r--core/java/android/view/animation/AnimationUtils.java89
-rw-r--r--core/java/android/view/animation/AnticipateInterpolator.java56
-rw-r--r--core/java/android/view/animation/AnticipateOvershootInterpolator.java83
-rw-r--r--core/java/android/view/animation/BounceInterpolator.java51
-rw-r--r--core/java/android/view/animation/OvershootInterpolator.java59
-rw-r--r--core/res/res/anim/anticipate_interpolator.xml21
-rw-r--r--core/res/res/anim/anticipate_overshoot_interpolator.xml21
-rw-r--r--core/res/res/anim/bounce_interpolator.xml21
-rw-r--r--core/res/res/anim/overshoot_interpolator.xml21
-rw-r--r--core/res/res/values/attrs.xml21
-rw-r--r--core/res/res/values/public.xml15
13 files changed, 417 insertions, 57 deletions
diff --git a/core/java/android/view/animation/AccelerateDecelerateInterpolator.java b/core/java/android/view/animation/AccelerateDecelerateInterpolator.java
index fdb6f9d..158c56e 100644
--- a/core/java/android/view/animation/AccelerateDecelerateInterpolator.java
+++ b/core/java/android/view/animation/AccelerateDecelerateInterpolator.java
@@ -28,6 +28,7 @@ public class AccelerateDecelerateInterpolator implements Interpolator {
public AccelerateDecelerateInterpolator() {
}
+ @SuppressWarnings({"UnusedDeclaration"})
public AccelerateDecelerateInterpolator(Context context, AttributeSet attrs) {
}
diff --git a/core/java/android/view/animation/AccelerateInterpolator.java b/core/java/android/view/animation/AccelerateInterpolator.java
index b9e293f..dcab743 100644
--- a/core/java/android/view/animation/AccelerateInterpolator.java
+++ b/core/java/android/view/animation/AccelerateInterpolator.java
@@ -26,7 +26,12 @@ import android.util.AttributeSet;
*
*/
public class AccelerateInterpolator implements Interpolator {
+ private final float mFactor;
+ private final double mDoubleFactor;
+
public AccelerateInterpolator() {
+ mFactor = 1.0f;
+ mDoubleFactor = 2.0;
}
/**
@@ -39,6 +44,7 @@ public class AccelerateInterpolator implements Interpolator {
*/
public AccelerateInterpolator(float factor) {
mFactor = factor;
+ mDoubleFactor = 2 * mFactor;
}
public AccelerateInterpolator(Context context, AttributeSet attrs) {
@@ -46,17 +52,16 @@ public class AccelerateInterpolator implements Interpolator {
context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.AccelerateInterpolator);
mFactor = a.getFloat(com.android.internal.R.styleable.AccelerateInterpolator_factor, 1.0f);
-
+ mDoubleFactor = 2 * mFactor;
+
a.recycle();
}
public float getInterpolation(float input) {
if (mFactor == 1.0f) {
- return (float)(input * input);
+ return input * input;
} else {
- return (float)Math.pow(input, 2 * mFactor);
+ return (float)Math.pow(input, mDoubleFactor);
}
}
-
- private float mFactor = 1.0f;
}
diff --git a/core/java/android/view/animation/AnimationUtils.java b/core/java/android/view/animation/AnimationUtils.java
index ce3cdc5..3088382 100644
--- a/core/java/android/view/animation/AnimationUtils.java
+++ b/core/java/android/view/animation/AnimationUtils.java
@@ -63,15 +63,13 @@ public class AnimationUtils {
parser = context.getResources().getAnimation(id);
return createAnimationFromXml(context, parser);
} catch (XmlPullParserException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x"
- + Integer.toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} catch (IOException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x"
- + Integer.toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} finally {
@@ -81,16 +79,17 @@ public class AnimationUtils {
private static Animation createAnimationFromXml(Context c, XmlPullParser parser)
throws XmlPullParserException, IOException {
+
return createAnimationFromXml(c, parser, null, Xml.asAttributeSet(parser));
}
- private static Animation createAnimationFromXml(Context c, XmlPullParser parser, AnimationSet parent, AttributeSet attrs)
- throws XmlPullParserException, IOException {
+ private static Animation createAnimationFromXml(Context c, XmlPullParser parser,
+ AnimationSet parent, AttributeSet attrs) throws XmlPullParserException, IOException {
Animation anim = null;
// Make sure we are on a start tag.
- int type = parser.getEventType();
+ int type;
int depth = parser.getDepth();
while (((type=parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
@@ -126,23 +125,21 @@ public class AnimationUtils {
}
- public static LayoutAnimationController loadLayoutAnimation(
- Context context, int id) throws NotFoundException {
+ public static LayoutAnimationController loadLayoutAnimation(Context context, int id)
+ throws NotFoundException {
XmlResourceParser parser = null;
try {
parser = context.getResources().getAnimation(id);
return createLayoutAnimationFromXml(context, parser);
} catch (XmlPullParserException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x" +
- Integer.toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} catch (IOException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x" +
- Integer .toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} finally {
@@ -150,24 +147,21 @@ public class AnimationUtils {
}
}
- private static LayoutAnimationController createLayoutAnimationFromXml(
- Context c, XmlPullParser parser)
- throws XmlPullParserException, IOException {
- return createLayoutAnimationFromXml(c, parser,
- Xml.asAttributeSet(parser));
+ private static LayoutAnimationController createLayoutAnimationFromXml(Context c,
+ XmlPullParser parser) throws XmlPullParserException, IOException {
+
+ return createLayoutAnimationFromXml(c, parser, Xml.asAttributeSet(parser));
}
- private static LayoutAnimationController createLayoutAnimationFromXml(
- Context c, XmlPullParser parser, AttributeSet attrs)
- throws XmlPullParserException, IOException {
+ private static LayoutAnimationController createLayoutAnimationFromXml(Context c,
+ XmlPullParser parser, AttributeSet attrs) throws XmlPullParserException, IOException {
LayoutAnimationController controller = null;
int type;
int depth = parser.getDepth();
- while (((type = parser.next()) != XmlPullParser.END_TAG
- || parser.getDepth() > depth)
+ while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
&& type != XmlPullParser.END_DOCUMENT) {
if (type != XmlPullParser.START_TAG) {
@@ -181,8 +175,7 @@ public class AnimationUtils {
} else if ("gridLayoutAnimation".equals(name)) {
controller = new GridLayoutAnimationController(c, attrs);
} else {
- throw new RuntimeException("Unknown layout animation name: " +
- name);
+ throw new RuntimeException("Unknown layout animation name: " + name);
}
}
@@ -197,9 +190,7 @@ public class AnimationUtils {
* @param fromLeft is the object to be animated coming from the left
* @return The new animation
*/
- public static Animation makeInAnimation(Context c, boolean fromLeft)
- {
-
+ public static Animation makeInAnimation(Context c, boolean fromLeft) {
Animation a;
if (fromLeft) {
a = AnimationUtils.loadAnimation(c, com.android.internal.R.anim.slide_in_left);
@@ -220,9 +211,7 @@ public class AnimationUtils {
* @param toRight is the object to be animated exiting to the right
* @return The new animation
*/
- public static Animation makeOutAnimation(Context c, boolean toRight)
- {
-
+ public static Animation makeOutAnimation(Context c, boolean toRight) {
Animation a;
if (toRight) {
a = AnimationUtils.loadAnimation(c, com.android.internal.R.anim.slide_out_right);
@@ -243,9 +232,7 @@ public class AnimationUtils {
* @param c Context for loading resources
* @return The new animation
*/
- public static Animation makeInChildBottomAnimation(Context c)
- {
-
+ public static Animation makeInChildBottomAnimation(Context c) {
Animation a;
a = AnimationUtils.loadAnimation(c, com.android.internal.R.anim.slide_in_child_bottom);
a.setInterpolator(new AccelerateInterpolator());
@@ -261,23 +248,19 @@ public class AnimationUtils {
* @return The animation object reference by the specified id
* @throws NotFoundException
*/
- public static Interpolator loadInterpolator(Context context, int id)
- throws NotFoundException {
-
+ public static Interpolator loadInterpolator(Context context, int id) throws NotFoundException {
XmlResourceParser parser = null;
try {
parser = context.getResources().getAnimation(id);
return createInterpolatorFromXml(context, parser);
} catch (XmlPullParserException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x"
- + Integer.toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} catch (IOException ex) {
- NotFoundException rnf = new NotFoundException(
- "Can't load animation resource ID #0x"
- + Integer.toHexString(id));
+ NotFoundException rnf = new NotFoundException("Can't load animation resource ID #0x" +
+ Integer.toHexString(id));
rnf.initCause(ex);
throw rnf;
} finally {
@@ -287,12 +270,12 @@ public class AnimationUtils {
}
private static Interpolator createInterpolatorFromXml(Context c, XmlPullParser parser)
- throws XmlPullParserException, IOException {
+ throws XmlPullParserException, IOException {
Interpolator interpolator = null;
// Make sure we are on a start tag.
- int type = parser.getEventType();
+ int type;
int depth = parser.getDepth();
while (((type=parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
@@ -317,6 +300,14 @@ public class AnimationUtils {
interpolator = new AccelerateDecelerateInterpolator(c, attrs);
} else if (name.equals("cycleInterpolator")) {
interpolator = new CycleInterpolator(c, attrs);
+ } else if (name.equals("anticipateInterpolator")) {
+ interpolator = new AnticipateInterpolator(c, attrs);
+ } else if (name.equals("overshootInterpolator")) {
+ interpolator = new OvershootInterpolator(c, attrs);
+ } else if (name.equals("anticipateOvershootInterpolator")) {
+ interpolator = new AnticipateOvershootInterpolator(c, attrs);
+ } else if (name.equals("bounceInterpolator")) {
+ interpolator = new BounceInterpolator(c, attrs);
} else {
throw new RuntimeException("Unknown interpolator name: " + parser.getName());
}
diff --git a/core/java/android/view/animation/AnticipateInterpolator.java b/core/java/android/view/animation/AnticipateInterpolator.java
new file mode 100644
index 0000000..a6f110e
--- /dev/null
+++ b/core/java/android/view/animation/AnticipateInterpolator.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.animation;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+
+/**
+ * An interpolator where the change starts backward then flings forward.
+ */
+public class AnticipateInterpolator implements Interpolator {
+ private final float mTension;
+
+ public AnticipateInterpolator() {
+ mTension = 2.0f;
+ }
+
+ /**
+ * @param tension Amount of anticipation. When tension equals 0.0f, there is
+ * no anticipation and the interpolator becomes a simple
+ * acceleration interpolator.
+ */
+ public AnticipateInterpolator(float tension) {
+ mTension = tension;
+ }
+
+ public AnticipateInterpolator(Context context, AttributeSet attrs) {
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ com.android.internal.R.styleable.AnticipateInterpolator);
+
+ mTension =
+ a.getFloat(com.android.internal.R.styleable.AnticipateInterpolator_tension, 2.0f);
+
+ a.recycle();
+ }
+
+ public float getInterpolation(float t) {
+ // a(t) = t * t * ((tension + 1) * t - tension)
+ return t * t * ((mTension + 1) * t - mTension);
+ }
+}
diff --git a/core/java/android/view/animation/AnticipateOvershootInterpolator.java b/core/java/android/view/animation/AnticipateOvershootInterpolator.java
new file mode 100644
index 0000000..3dc9722
--- /dev/null
+++ b/core/java/android/view/animation/AnticipateOvershootInterpolator.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.animation;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import static com.android.internal.R.styleable.AnticipateOvershootInterpolator_extraTension;
+import static com.android.internal.R.styleable.AnticipateOvershootInterpolator_tension;
+import static com.android.internal.R.styleable.AnticipateOvershootInterpolator;
+
+/**
+ * An interpolator where the change starts backward then flings forward and overshoots
+ * the target value and finally goes back to the final value.
+ */
+public class AnticipateOvershootInterpolator implements Interpolator {
+ private final float mTension;
+
+ public AnticipateOvershootInterpolator() {
+ mTension = 2.0f * 1.5f;
+ }
+
+ /**
+ * @param tension Amount of anticipation/overshoot. When tension equals 0.0f,
+ * there is no anticipation/overshoot and the interpolator becomes
+ * a simple acceleration/deceleration interpolator.
+ */
+ public AnticipateOvershootInterpolator(float tension) {
+ mTension = tension * 1.5f;
+ }
+
+ /**
+ * @param tension Amount of anticipation/overshoot. When tension equals 0.0f,
+ * there is no anticipation/overshoot and the interpolator becomes
+ * a simple acceleration/deceleration interpolator.
+ * @param extraTension Amount by which to multiply the tension. For instance,
+ * to get the same overshoot as an OvershootInterpolator with
+ * a tension of 2.0f, you would use an extraTension of 1.5f.
+ */
+ public AnticipateOvershootInterpolator(float tension, float extraTension) {
+ mTension = tension * extraTension;
+ }
+
+ public AnticipateOvershootInterpolator(Context context, AttributeSet attrs) {
+ TypedArray a = context.obtainStyledAttributes(attrs, AnticipateOvershootInterpolator);
+
+ mTension = a.getFloat(AnticipateOvershootInterpolator_tension, 2.0f) *
+ a.getFloat(AnticipateOvershootInterpolator_extraTension, 1.5f);
+
+ a.recycle();
+ }
+
+ private static float a(float t, float s) {
+ return t * t * ((s + 1) * t - s);
+ }
+
+ private static float o(float t, float s) {
+ return t * t * ((s + 1) * t + s);
+ }
+
+ public float getInterpolation(float t) {
+ // a(t, s) = t * t * ((s + 1) * t - s)
+ // o(t, s) = t * t * ((s + 1) * t + s)
+ // f(t) = 0.5 * a(t * 2, tension * extraTension), when t < 0.5
+ // f(t) = 0.5 * (o(t * 2 - 2, tension * extraTension) + 2), when t <= 1.0
+ if (t < 0.5f) return 0.5f * a(t * 2.0f, mTension);
+ else return 0.5f * (o(t * 2.0f - 2.0f, mTension) + 2.0f);
+ }
+}
diff --git a/core/java/android/view/animation/BounceInterpolator.java b/core/java/android/view/animation/BounceInterpolator.java
new file mode 100644
index 0000000..f79e730
--- /dev/null
+++ b/core/java/android/view/animation/BounceInterpolator.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.animation;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+
+/**
+ * An interpolator where the change bounces at the end.
+ */
+public class BounceInterpolator implements Interpolator {
+ public BounceInterpolator() {
+ }
+
+ @SuppressWarnings({"UnusedDeclaration"})
+ public BounceInterpolator(Context context, AttributeSet attrs) {
+ }
+
+ private static float bounce(float t) {
+ return t * t * 8.0f;
+ }
+
+ public float getInterpolation(float t) {
+ // _b(t) = t * t * 8
+ // bs(t) = _b(t) for t < 0.3535
+ // bs(t) = _b(t - 0.54719) + 0.7 for t < 0.7408
+ // bs(t) = _b(t - 0.8526) + 0.9 for t < 0.9644
+ // bs(t) = _b(t - 1.0435) + 0.95 for t <= 1.0
+ // b(t) = bs(t * 1.1226)
+ t *= 1.1226f;
+ if (t < 0.3535f) return bounce(t);
+ else if (t < 0.7408f) return bounce(t - 0.54719f) + 0.7f;
+ else if (t < 0.9644f) return bounce(t - 0.8526f) + 0.9f;
+ else return bounce(t - 1.0435f) + 0.95f;
+ }
+} \ No newline at end of file
diff --git a/core/java/android/view/animation/OvershootInterpolator.java b/core/java/android/view/animation/OvershootInterpolator.java
new file mode 100644
index 0000000..494f8ab
--- /dev/null
+++ b/core/java/android/view/animation/OvershootInterpolator.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.animation;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+
+/**
+ * An interpolator where the change flings forward and overshoots the last value
+ * then comes back.
+ */
+public class OvershootInterpolator implements Interpolator {
+ private final float mTension;
+
+ public OvershootInterpolator() {
+ mTension = 2.0f;
+ }
+
+ /**
+ * @param tension Amount of overshoot. When tension equals 0.0f, there is
+ * no overshoot and the interpolator becomes a simple
+ * deceleration interpolator.
+ */
+ public OvershootInterpolator(float tension) {
+ mTension = tension;
+ }
+
+ public OvershootInterpolator(Context context, AttributeSet attrs) {
+ TypedArray a = context.obtainStyledAttributes(attrs,
+ com.android.internal.R.styleable.OvershootInterpolator);
+
+ mTension =
+ a.getFloat(com.android.internal.R.styleable.OvershootInterpolator_tension, 2.0f);
+
+ a.recycle();
+ }
+
+ public float getInterpolation(float t) {
+ // _o(t) = t * t * ((tension + 1) * t + tension)
+ // o(t) = _o(t - 1) + 1
+ t -= 1.0f;
+ return t * t * ((mTension + 1) * t + mTension) + 1.0f;
+ }
+}
diff --git a/core/res/res/anim/anticipate_interpolator.xml b/core/res/res/anim/anticipate_interpolator.xml
new file mode 100644
index 0000000..50a555a
--- /dev/null
+++ b/core/res/res/anim/anticipate_interpolator.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<anticipateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/core/res/res/anim/anticipate_overshoot_interpolator.xml b/core/res/res/anim/anticipate_overshoot_interpolator.xml
new file mode 100644
index 0000000..440a899
--- /dev/null
+++ b/core/res/res/anim/anticipate_overshoot_interpolator.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<anticipateOvershootInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/core/res/res/anim/bounce_interpolator.xml b/core/res/res/anim/bounce_interpolator.xml
new file mode 100644
index 0000000..406fbb9
--- /dev/null
+++ b/core/res/res/anim/bounce_interpolator.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<bounceInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/core/res/res/anim/overshoot_interpolator.xml b/core/res/res/anim/overshoot_interpolator.xml
new file mode 100644
index 0000000..c614e0b
--- /dev/null
+++ b/core/res/res/anim/overshoot_interpolator.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<overshootInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 9d041f9..e4e8990 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2525,12 +2525,12 @@
</declare-styleable>
<declare-styleable name="AccelerateInterpolator">
- <!-- This is the amount of deceleration to ad when easing in. -->
+ <!-- This is the amount of deceleration to add when easing in. -->
<attr name="factor" format="float" />
</declare-styleable>
<declare-styleable name="DecelerateInterpolator">
- <!-- This is the amount of acceleration to ad when easing out. -->
+ <!-- This is the amount of acceleration to add when easing out. -->
<attr name="factor" />
</declare-styleable>
@@ -2538,6 +2538,23 @@
<attr name="cycles" format="float" />
</declare-styleable>
+ <declare-styleable name="AnticipateInterpolator">
+ <!-- This is the amount of tension. -->
+ <attr name="tension" format="float" />
+ </declare-styleable>
+
+ <declare-styleable name="OvershootInterpolator">
+ <!-- This is the amount of tension. -->
+ <attr name="tension" />
+ </declare-styleable>
+
+ <declare-styleable name="AnticipateOvershootInterpolator">
+ <!-- This is the amount of tension. -->
+ <attr name="tension" />
+ <!-- This is the amount by which to multiply the tension. -->
+ <attr name="extraTension" format="float" />
+ </declare-styleable>
+
<!-- ========================== -->
<!-- State attributes -->
<!-- ========================== -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 66a2cb8..f42d9eb 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1109,5 +1109,18 @@
=============================================================== -->
<eat-comment />
- <public type="attr" name="accountType" id="0x01010270" />
+ <public type="attr" name="tension" id="0x01010270" />
+ <public type="attr" name="extraTension" id="0x01010271" />
+
+ <public type="anim" name="anticipate_interpolator" id="0x010a0007" />
+ <public type="anim" name="overshoot_interpolator" id="0x010a0008" />
+ <public type="anim" name="anticipate_overshoot_interpolator" id="0x010a0009" />
+ <public type="anim" name="bounce_interpolator" id="0x010a000a" />
+
+<!-- ===============================================================
+ Resources added in version 5 of the platform.
+ =============================================================== -->
+ <eat-comment />
+
+ <public type="attr" name="accountType" id="0x01010272" />
</resources>