Bug 868460 - Mark views to have transient state while animating (r=mfinkle)

This commit is contained in:
Lucas Rocha 2013-05-07 18:04:10 +01:00
parent 6258609329
commit 0b9dbd9c2f
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@
package org.mozilla.gecko;
import android.support.v4.view.ViewCompat;
import android.os.Build;
import android.os.Handler;
import android.view.Choreographer;
@ -131,6 +132,8 @@ public class PropertyAnimator implements Runnable {
else if (element.property == Property.HEIGHT)
element.from = element.proxy.getHeight();
ViewCompat.setHasTransientState(element.view, true);
if (shouldEnableHardwareLayer(element))
element.view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
else
@ -156,6 +159,8 @@ public class PropertyAnimator implements Runnable {
if (snapToEndPosition)
invalidate(element, element.to);
ViewCompat.setHasTransientState(element.view, false);
if (shouldEnableHardwareLayer(element))
element.view.setLayerType(View.LAYER_TYPE_NONE, null);
else

View File

@ -336,8 +336,6 @@ public class TabsTray extends TwoWayView
public void onPropertyAnimationStart() { }
@Override
public void onPropertyAnimationEnd() {
// Reset view presentation as it will be recycled in the
// list view by the adapter.
AnimatorProxy proxy = AnimatorProxy.create(view);
proxy.setAlpha(1);