diff options
author | Tony Wickham <twickham@google.com> | 2017-06-05 17:54:45 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-06-05 17:54:45 -0700 |
commit | 79b176e42c107b34a649866de2bcfca439181cf0 (patch) | |
tree | 62c5b6c2aa327cbf5d69423b8edcb4011fcb8dce | |
parent | acaf5b3a37af11b40166c10e856175bb96cb1476 (diff) | |
download | android_packages_apps_Trebuchet-79b176e42c107b34a649866de2bcfca439181cf0.tar.gz android_packages_apps_Trebuchet-79b176e42c107b34a649866de2bcfca439181cf0.tar.bz2 android_packages_apps_Trebuchet-79b176e42c107b34a649866de2bcfca439181cf0.zip |
Fix visibility of notification footer divider
Now it is only visible when the notification footer is present,
instead of always being visible.
Change-Id: Ie85ff31918901115cdfe55b36e75aa80b43e7b13
-rw-r--r-- | res/layout/notification.xml | 3 | ||||
-rw-r--r-- | src/com/android/launcher3/notification/NotificationFooterLayout.java | 1 | ||||
-rw-r--r-- | src/com/android/launcher3/popup/PopupContainerWithArrow.java | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/res/layout/notification.xml b/res/layout/notification.xml index a03dd0833..a183c92f7 100644 --- a/res/layout/notification.xml +++ b/res/layout/notification.xml @@ -66,7 +66,8 @@ android:layout_width="match_parent" android:layout_height="@dimen/popup_item_divider_height" android:background="?android:attr/listDivider" - android:layout_below="@id/main_view"/> + android:layout_below="@id/main_view" + android:visibility="gone" /> <include layout="@layout/notification_footer" android:id="@+id/footer" diff --git a/src/com/android/launcher3/notification/NotificationFooterLayout.java b/src/com/android/launcher3/notification/NotificationFooterLayout.java index 051c0333d..b83c9b95d 100644 --- a/src/com/android/launcher3/notification/NotificationFooterLayout.java +++ b/src/com/android/launcher3/notification/NotificationFooterLayout.java @@ -205,6 +205,7 @@ public class NotificationFooterLayout extends FrameLayout { collapseFooter.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { + ((ViewGroup) getParent()).findViewById(R.id.divider).setVisibility(GONE); ((ViewGroup) getParent()).removeView(NotificationFooterLayout.this); } }); diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index 152886e81..fa4caab8b 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -278,6 +278,9 @@ public class PopupContainerWithArrow extends AbstractFloatingView implements Dra int footerHeight = notificationFooterHasIcons ? res.getDimensionPixelSize(R.dimen.notification_footer_height) : 0; item.findViewById(R.id.footer).getLayoutParams().height = footerHeight; + if (notificationFooterHasIcons) { + mNotificationItemView.findViewById(R.id.divider).setVisibility(VISIBLE); + } int roundedCorners = ROUNDED_TOP_CORNERS | ROUNDED_BOTTOM_CORNERS; if (shouldUnroundTopCorners) { |