summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/notification/NotificationItemView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/notification/NotificationItemView.java')
-rw-r--r--src/com/android/launcher3/notification/NotificationItemView.java14
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) {