mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 868460 - Mark views to have transient state while animating (r=mfinkle)
This commit is contained in:
parent
6258609329
commit
0b9dbd9c2f
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user