diff --git a/api/current.xml b/api/current.xml
index 673d053e111f9..787fcb41b8c82 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -3419,39 +3419,6 @@
visibility="public"
>
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/core/res/res/drawable/progress_large_white.xml b/core/res/res/drawable/progress_large_white.xml
new file mode 100644
index 0000000000000..c690ed4e0e9ae
--- /dev/null
+++ b/core/res/res/drawable/progress_large_white.xml
@@ -0,0 +1,25 @@
+
+
+
diff --git a/core/res/res/drawable/progress_medium.xml b/core/res/res/drawable/progress_medium.xml
index 92aebb51a512a..eb1bd50d17d73 100644
--- a/core/res/res/drawable/progress_medium.xml
+++ b/core/res/res/drawable/progress_medium.xml
@@ -1,43 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/core/res/res/drawable/progress_medium_white.xml b/core/res/res/drawable/progress_medium_white.xml
new file mode 100644
index 0000000000000..b4f9b318a902a
--- /dev/null
+++ b/core/res/res/drawable/progress_medium_white.xml
@@ -0,0 +1,25 @@
+
+
+
diff --git a/core/res/res/drawable/progress_small.xml b/core/res/res/drawable/progress_small.xml
index e5b0021d59cf5..e0ee5e47d8305 100644
--- a/core/res/res/drawable/progress_small.xml
+++ b/core/res/res/drawable/progress_small.xml
@@ -1,45 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/core/res/res/drawable/progress_small_titlebar.xml b/core/res/res/drawable/progress_small_titlebar.xml
index cf8e41cb373dc..8cfba864b5b2c 100644
--- a/core/res/res/drawable/progress_small_titlebar.xml
+++ b/core/res/res/drawable/progress_small_titlebar.xml
@@ -1,45 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/core/res/res/drawable/progress_small_white.xml b/core/res/res/drawable/progress_small_white.xml
new file mode 100644
index 0000000000000..8cfba864b5b2c
--- /dev/null
+++ b/core/res/res/drawable/progress_small_white.xml
@@ -0,0 +1,25 @@
+
+
+
diff --git a/core/res/res/drawable/spinner_black_16.png b/core/res/res/drawable/spinner_black_16.png
new file mode 100644
index 0000000000000..5ee33cea6fa7d
Binary files /dev/null and b/core/res/res/drawable/spinner_black_16.png differ
diff --git a/core/res/res/drawable/spinner_black_48.png b/core/res/res/drawable/spinner_black_48.png
new file mode 100644
index 0000000000000..3a681926b537f
Binary files /dev/null and b/core/res/res/drawable/spinner_black_48.png differ
diff --git a/core/res/res/drawable/spinner_black_76.png b/core/res/res/drawable/spinner_black_76.png
new file mode 100644
index 0000000000000..ec57460277a66
Binary files /dev/null and b/core/res/res/drawable/spinner_black_76.png differ
diff --git a/core/res/res/drawable/spinner_white_16.png b/core/res/res/drawable/spinner_white_16.png
new file mode 100644
index 0000000000000..dd2e1fd7da16d
Binary files /dev/null and b/core/res/res/drawable/spinner_white_16.png differ
diff --git a/core/res/res/drawable/spinner_white_48.png b/core/res/res/drawable/spinner_white_48.png
new file mode 100644
index 0000000000000..d25a33e245348
Binary files /dev/null and b/core/res/res/drawable/spinner_white_48.png differ
diff --git a/core/res/res/drawable/spinner_white_76.png b/core/res/res/drawable/spinner_white_76.png
new file mode 100644
index 0000000000000..f53e8ffdb193c
Binary files /dev/null and b/core/res/res/drawable/spinner_white_76.png differ
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index d0701070e3564..3e93b0266e352 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -350,6 +350,12 @@
+
+
+
+
+
+
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 14d8dbe20bfe8..2121669c91747 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1120,11 +1120,17 @@
+
+
+
+
+
+
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 648a7dd691cdf..7d235ec8d4ef9 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -243,7 +243,7 @@
+
+
+
+
+
+
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index f37d514e6e1d2..bd6e1df10f902 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -154,6 +154,9 @@
- @android:style/Widget.ProgressBar.Small
- @android:style/Widget.ProgressBar.Small.Title
- @android:style/Widget.ProgressBar.Large
+ - @android:style/Widget.ProgressBar.Inverse
+ - @android:style/Widget.ProgressBar.Small.Inverse
+ - @android:style/Widget.ProgressBar.Large.Inverse
- @android:style/Widget.SeekBar
- @android:style/Widget.RatingBar
- @android:style/Widget.RatingBar.Indicator
@@ -233,6 +236,13 @@
- @android:style/Widget.ListView.White
- @drawable/divider_horizontal_bright
- @android:style/Widget.TextView.ListSeparator.White
+
+ - @android:style/Widget.ProgressBar.Inverse
+ - @android:style/Widget.ProgressBar.Small.Inverse
+ - @android:style/Widget.ProgressBar.Large.Inverse
+ - @android:style/Widget.ProgressBar
+ - @android:style/Widget.ProgressBar.Small
+ - @android:style/Widget.ProgressBar.Large
diff --git a/graphics/java/android/graphics/drawable/Animatable.java b/graphics/java/android/graphics/drawable/Animatable.java
new file mode 100644
index 0000000000000..9dc62c36d6180
--- /dev/null
+++ b/graphics/java/android/graphics/drawable/Animatable.java
@@ -0,0 +1,39 @@
+/*
+ * 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.graphics.drawable;
+
+/**
+ * Interface that drawables suporting animations should implement.
+ */
+public interface Animatable {
+ /**
+ * Starts the drawable's animation.
+ */
+ void start();
+
+ /**
+ * Stops the drawable's animation.
+ */
+ void stop();
+
+ /**
+ * Indicates whether the animation is running.
+ *
+ * @return True if the animation is running, false otherwise.
+ */
+ boolean isRunning();
+}
diff --git a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
index 08d295d1820e5..ac96f20bc5274 100644
--- a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
@@ -35,11 +35,14 @@ import com.android.internal.R;
/**
* @hide
*/
-public class AnimatedRotateDrawable extends Drawable implements Drawable.Callback, Runnable {
+public class AnimatedRotateDrawable extends Drawable implements Drawable.Callback, Runnable,
+ Animatable {
+
private AnimatedRotateState mState;
private boolean mMutated;
private float mCurrentDegrees;
private float mIncrement;
+ private boolean mRunning;
public AnimatedRotateDrawable() {
this(null);
@@ -80,10 +83,24 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
drawable.draw(canvas);
canvas.restoreToCount(saveCount);
-
- nextFrame();
}
-
+
+ public void start() {
+ if (!mRunning) {
+ mRunning = true;
+ nextFrame();
+ }
+ }
+
+ public void stop() {
+ mRunning = false;
+ unscheduleSelf(this);
+ }
+
+ public boolean isRunning() {
+ return mRunning;
+ }
+
private void nextFrame() {
unscheduleSelf(this);
scheduleSelf(this, SystemClock.uptimeMillis() + mState.mFrameDuration);
@@ -96,8 +113,8 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
if (mCurrentDegrees > (360.0f - mIncrement)) {
mCurrentDegrees = 0.0f;
}
- nextFrame();
invalidateSelf();
+ nextFrame();
}
@Override
diff --git a/graphics/java/android/graphics/drawable/AnimationDrawable.java b/graphics/java/android/graphics/drawable/AnimationDrawable.java
index bab1703fbf242..68718c9763eb6 100644
--- a/graphics/java/android/graphics/drawable/AnimationDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimationDrawable.java
@@ -71,7 +71,7 @@ import android.util.AttributeSet;
* @attr ref android.R.styleable#AnimationDrawableItem_duration
* @attr ref android.R.styleable#AnimationDrawableItem_drawable
*/
-public class AnimationDrawable extends DrawableContainer implements Runnable {
+public class AnimationDrawable extends DrawableContainer implements Runnable, Animatable {
private final AnimationState mAnimationState;
private int mCurFrame = -1;
private boolean mMutated;