Automated import from //branches/cupcake/...@141884,141884
This commit is contained in:
committed by
The Android Open Source Project
parent
d8b4b0d937
commit
32f2ccd393
@@ -2327,8 +2327,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
final boolean drawAnimation = (child.mPrivateFlags & DRAW_ANIMATION) == DRAW_ANIMATION;
|
||||
|
||||
do {
|
||||
if (drawAnimation && parent instanceof View) {
|
||||
((View) parent).mPrivateFlags |= DRAW_ANIMATION;
|
||||
if (drawAnimation) {
|
||||
if (parent instanceof View) {
|
||||
((View) parent).mPrivateFlags |= DRAW_ANIMATION;
|
||||
} else if (parent instanceof ViewRoot) {
|
||||
((ViewRoot) parent).mIsAnimating = true;
|
||||
}
|
||||
}
|
||||
parent = parent.invalidateChildInParent(location, dirty);
|
||||
} while (parent != null);
|
||||
|
||||
@@ -33,7 +33,6 @@ import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.util.EventLog;
|
||||
import android.util.SparseArray;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.View.MeasureSpec;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@@ -128,6 +127,7 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
int mWidth;
|
||||
int mHeight;
|
||||
Rect mDirty; // will be a graphics.Region soon
|
||||
boolean mIsAnimating;
|
||||
|
||||
final View.AttachInfo mAttachInfo;
|
||||
|
||||
@@ -1183,7 +1183,7 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
}
|
||||
|
||||
try {
|
||||
if (!dirty.isEmpty()) {
|
||||
if (!dirty.isEmpty() || mIsAnimating) {
|
||||
long startTime;
|
||||
|
||||
if (DEBUG_ORIENTATION || DEBUG_DRAW) {
|
||||
@@ -1210,6 +1210,7 @@ public final class ViewRoot extends Handler implements ViewParent,
|
||||
}
|
||||
|
||||
dirty.setEmpty();
|
||||
mIsAnimating = false;
|
||||
mAttachInfo.mDrawingTime = SystemClock.uptimeMillis();
|
||||
canvas.translate(0, -yoff);
|
||||
mView.mPrivateFlags |= View.DRAWN;
|
||||
|
||||
@@ -156,7 +156,6 @@ public class TranslateAnimation extends Animation {
|
||||
if (mFromYDelta != mToYDelta) {
|
||||
dy = mFromYDelta + ((mToYDelta - mFromYDelta) * interpolatedTime);
|
||||
}
|
||||
|
||||
t.getMatrix().setTranslate(dx, dy);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user