merge from open-source master

Change-Id: Ia0201ec7be4c112569b8775429d1c9674eb3b661
This commit is contained in:
The Android Open Source Project
2010-05-17 08:56:54 -07:00
3 changed files with 21 additions and 1 deletions

View File

@@ -947,4 +947,20 @@ public class ProgressBar extends View {
setProgress(ss.progress);
setSecondaryProgress(ss.secondaryProgress);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (mIndeterminate) {
startAnimation();
}
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (mIndeterminate) {
stopAnimation();
}
}
}