diff options
author | Jon Miranda <jonmiranda@google.com> | 2017-09-18 16:53:16 -0400 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2017-09-18 16:53:16 -0400 |
commit | 7f55620089eb54a73a41fe0ba18d4f4ec720ebb7 (patch) | |
tree | 459afef125a9b5473eaa869534f45b3229aadcf0 /src/com/android/launcher3/notification/NotificationItemView.java | |
parent | dff92fe1aa90dfad1cce228ee140a70ab7a365b2 (diff) | |
parent | d926a9316f61a7540b00ecd42acba8013e715f92 (diff) | |
download | android_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.tar.gz android_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.tar.bz2 android_packages_apps_Trebuchet-7f55620089eb54a73a41fe0ba18d4f4ec720ebb7.zip |
Merge branch 'ub-launcher3-dorval-polish2'
Bug: 64937210
Test: flashed img
Change-Id: Id6a05e7be885bf5c53a41eab2573c6ae3a44dc55
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationItemView.java')
-rw-r--r-- | src/com/android/launcher3/notification/NotificationItemView.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/launcher3/notification/NotificationItemView.java b/src/com/android/launcher3/notification/NotificationItemView.java index 78c64d7da..ab94c32d0 100644 --- a/src/com/android/launcher3/notification/NotificationItemView.java +++ b/src/com/android/launcher3/notification/NotificationItemView.java @@ -90,9 +90,19 @@ public class NotificationItemView extends PopupItemView implements LogContainerP return mMainView; } + /** + * This method is used to calculate the height to remove when dismissing the last notification. + * We subtract the height of the footer in this case since the footer should be gone or in the + * process of being removed. + * @return The height of the entire notification item, minus the footer if it still exists. + */ public int getHeightMinusFooter() { - int footerHeight = mFooter.getParent() == null ? 0 : mFooter.getHeight(); - return getHeight() - footerHeight; + if (mFooter.getParent() == null) { + return getHeight(); + } + int excessFooterHeight = mFooter.getHeight() - getResources().getDimensionPixelSize( + R.dimen.notification_empty_footer_height); + return getHeight() - excessFooterHeight; } public Animator animateHeightRemoval(int heightToRemove, boolean shouldRemoveFromTop) { |