Fix landscape app open/close animations.

Bug: 123900446
Bug: 124510042
Change-Id: I3db80d6f8064ce26f97cdede63c0d25499416e98
This commit is contained in:
Jon Miranda
2019-05-15 10:43:00 -07:00
parent 0d1c0ab1bd
commit ffaca2e162
2 changed files with 38 additions and 11 deletions

View File

@@ -210,7 +210,12 @@ public class FloatingIconView extends View implements
Math.max(shapeProgressStart, progress), shapeProgressStart, 1f, 0, toMax,
LINEAR), 0, 1);
mOutline.bottom = (int) (rect.height() / scale);
if (mIsVerticalBarLayout) {
mOutline.right = (int) (rect.width() / scale);
} else {
mOutline.bottom = (int) (rect.height() / scale);
}
mTaskCornerRadius = cornerRadius / scale;
if (mIsAdaptiveIcon) {
if (!isOpening && shapeRevealProgress >= 0) {
@@ -230,7 +235,8 @@ public class FloatingIconView extends View implements
mRevealAnimator.setCurrentFraction(shapeRevealProgress);
}
float drawableScale = mOutline.height() / minSize;
float drawableScale = (mIsVerticalBarLayout ? mOutline.width() : mOutline.height())
/ minSize;
setBackgroundDrawableBounds(drawableScale);
if (isOpening) {
// Center align foreground