Fixed an issue when launching notification groups
The clipping on the bottom wasn't calculated accurately Change-Id: Iaf4aab575418ce8477503ae3079f9913f8b669f6 Fixes: 110093221 Test: launch group, observe normal animation
This commit is contained in:
@@ -299,6 +299,10 @@ public class ActivityLaunchAnimator {
|
||||
return top;
|
||||
}
|
||||
|
||||
public int getBottom() {
|
||||
return bottom;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return right - left;
|
||||
}
|
||||
|
||||
@@ -2001,7 +2001,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
float interpolation = Interpolators.FAST_OUT_SLOW_IN.getInterpolation(params.getProgress());
|
||||
int startClipTopAmount = params.getStartClipTopAmount();
|
||||
if (mNotificationParent != null) {
|
||||
top -= mNotificationParent.getTranslationY();
|
||||
float parentY = mNotificationParent.getTranslationY();
|
||||
top -= parentY;
|
||||
mNotificationParent.setTranslationZ(translationZ);
|
||||
int parentStartClipTopAmount = params.getParentStartClipTopAmount();
|
||||
if (startClipTopAmount != 0) {
|
||||
@@ -2011,8 +2012,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
mNotificationParent.setClipTopAmount(clipTopAmount);
|
||||
}
|
||||
mNotificationParent.setExtraWidthForClipping(extraWidthForClipping);
|
||||
mNotificationParent.setMinimumHeightForClipping(params.getHeight()
|
||||
+ mNotificationParent.getActualHeight());
|
||||
float clipBottom = Math.max(params.getBottom(),
|
||||
parentY + mNotificationParent.getActualHeight()
|
||||
- mNotificationParent.getClipBottomAmount());
|
||||
float clipTop = Math.min(params.getTop(), parentY);
|
||||
int minimumHeightForClipping = (int) (clipBottom - clipTop);
|
||||
mNotificationParent.setMinimumHeightForClipping(minimumHeightForClipping);
|
||||
} else if (startClipTopAmount != 0) {
|
||||
int clipTopAmount = (int) MathUtils.lerp(startClipTopAmount, 0, interpolation);
|
||||
setClipTopAmount(clipTopAmount);
|
||||
|
||||
Reference in New Issue
Block a user