mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 772940 - Add support for height animations with PropertyAnimator (r=mfinkle)
This commit is contained in:
parent
38a3d1c3be
commit
0d36da2763
@ -26,7 +26,8 @@ public class PropertyAnimator implements Runnable {
|
||||
TRANSLATION_X,
|
||||
TRANSLATION_Y,
|
||||
SCROLL_X,
|
||||
SCROLL_Y
|
||||
SCROLL_Y,
|
||||
HEIGHT
|
||||
}
|
||||
|
||||
private class ElementHolder {
|
||||
@ -116,6 +117,8 @@ public class PropertyAnimator implements Runnable {
|
||||
element.from = element.proxy.getScrollY();
|
||||
else if (element.property == Property.SCROLL_X)
|
||||
element.from = element.proxy.getScrollX();
|
||||
else if (element.property == Property.HEIGHT)
|
||||
element.from = element.proxy.getHeight();
|
||||
|
||||
if (shouldEnableHardwareLayer(element))
|
||||
element.view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
@ -183,6 +186,8 @@ public class PropertyAnimator implements Runnable {
|
||||
element.proxy.scrollTo(element.proxy.getScrollX(), (int) delta);
|
||||
else if (element.property == Property.SCROLL_X)
|
||||
element.proxy.scrollTo((int) delta, element.proxy.getScrollY());
|
||||
else if (element.property == Property.HEIGHT)
|
||||
element.proxy.setHeight((int) delta);
|
||||
}
|
||||
|
||||
private static abstract class FramePoster {
|
||||
|
Loading…
Reference in New Issue
Block a user