Consider icon scale when calculating icon offset in shelf

Fixes the the jumping of the last icon in the notification shade when
you start to collapse slowly.

Test: visual
Change-Id: Ia4d4189104ce1b4e7b45276f4a2fa26f8186390e
Fixes: 80270979
This commit is contained in:
Evan Laird
2018-05-31 18:48:05 -04:00
parent abed288a08
commit 5dad60e692

View File

@@ -482,8 +482,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
iconTransformDistance = Math.min(iconTransformDistance, fullHeight);
if (isLastChild) {
fullHeight = Math.min(fullHeight, row.getMinHeight() - getIntrinsicHeight());
iconTransformDistance = Math.min(iconTransformDistance, row.getMinHeight()
- getIntrinsicHeight());
iconTransformDistance = Math.min(iconTransformDistance,
row.getMinHeight() - getIntrinsicHeight() * icon.getIconScale());
}
float viewEnd = viewStart + fullHeight;
if (expandingAnimated && mAmbientState.getScrollY() == 0