Loading res/layout/notification.xml +2 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:gravity="bottom" android:gravity="center_vertical" android:text="@string/notifications_header" android:textSize="@dimen/notification_header_text_size" android:textColor="?android:attr/textColorPrimary" /> Loading @@ -58,7 +58,7 @@ android:layout_width="@dimen/notification_icon_size" android:layout_height="match_parent" android:layout_gravity="end" android:gravity="bottom|center_horizontal" android:gravity="center" android:textSize="@dimen/notification_header_count_text_size" android:fontFamily="sans-serif-medium" android:textColor="?android:attr/textColorPrimary" /> Loading res/layout/notification_main.xml +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ android:background="?attr/popupColorPrimary" android:paddingStart="@dimen/notification_padding_start" android:paddingEnd="@dimen/notification_main_text_padding_end" android:paddingBottom="16dp"> android:paddingBottom="14dp"> <TextView android:id="@+id/title" android:layout_width="match_parent" Loading Loading @@ -59,7 +59,7 @@ android:layout_width="@dimen/notification_icon_size" android:layout_height="@dimen/notification_icon_size" android:layout_marginEnd="@dimen/notification_padding_end" android:layout_marginBottom="8dp" android:layout_marginBottom="7dp" android:layout_gravity="center_vertical|end" /> </com.android.launcher3.notification.NotificationMainView> Loading res/values/dimens.xml +4 −2 Original line number Diff line number Diff line Loading @@ -214,9 +214,11 @@ <dimen name="notification_padding_end">12dp</dimen> <!-- notification_padding_end + (icon_size - footer_icon_size) / 2 --> <dimen name="notification_footer_icon_row_padding">15dp</dimen> <dimen name="notification_header_height">32dp</dimen> <dimen name="notification_main_height">96dp</dimen> <dimen name="notification_header_height">36dp</dimen> <dimen name="notification_main_height">84dp</dimen> <dimen name="notification_footer_height">32dp</dimen> <!-- How much space to keep as padding for the last notification when the footer collapses --> <dimen name="notification_empty_footer_height">6dp</dimen> <dimen name="notification_header_text_size">13sp</dimen> <dimen name="notification_header_count_text_size">12sp</dimen> <dimen name="notification_main_title_size">16sp</dimen> Loading src/com/android/launcher3/notification/NotificationFooterLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,9 @@ public class NotificationFooterLayout extends FrameLayout { PopupContainerWithArrow popup = PopupContainerWithArrow.getOpen( Launcher.getLauncher(getContext())); if (popup != null) { Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight(), final int newHeight = getResources().getDimensionPixelSize( R.dimen.notification_empty_footer_height); Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight() - newHeight, getResources().getInteger(R.integer.config_removeNotificationViewDuration)); collapseFooter.addListener(new AnimatorListenerAdapter() { @Override Loading @@ -208,7 +210,7 @@ public class NotificationFooterLayout extends FrameLayout { ((ViewGroup) getParent()).findViewById(R.id.divider).setVisibility(GONE); // Keep view around because gutter is aligned to it, but remove height to // both hide the view and keep calculations correct for last dismissal. getLayoutParams().height = 0; getLayoutParams().height = newHeight; requestLayout(); } }); Loading src/com/android/launcher3/notification/NotificationItemView.java +12 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading
res/layout/notification.xml +2 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:gravity="bottom" android:gravity="center_vertical" android:text="@string/notifications_header" android:textSize="@dimen/notification_header_text_size" android:textColor="?android:attr/textColorPrimary" /> Loading @@ -58,7 +58,7 @@ android:layout_width="@dimen/notification_icon_size" android:layout_height="match_parent" android:layout_gravity="end" android:gravity="bottom|center_horizontal" android:gravity="center" android:textSize="@dimen/notification_header_count_text_size" android:fontFamily="sans-serif-medium" android:textColor="?android:attr/textColorPrimary" /> Loading
res/layout/notification_main.xml +2 −2 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ android:background="?attr/popupColorPrimary" android:paddingStart="@dimen/notification_padding_start" android:paddingEnd="@dimen/notification_main_text_padding_end" android:paddingBottom="16dp"> android:paddingBottom="14dp"> <TextView android:id="@+id/title" android:layout_width="match_parent" Loading Loading @@ -59,7 +59,7 @@ android:layout_width="@dimen/notification_icon_size" android:layout_height="@dimen/notification_icon_size" android:layout_marginEnd="@dimen/notification_padding_end" android:layout_marginBottom="8dp" android:layout_marginBottom="7dp" android:layout_gravity="center_vertical|end" /> </com.android.launcher3.notification.NotificationMainView> Loading
res/values/dimens.xml +4 −2 Original line number Diff line number Diff line Loading @@ -214,9 +214,11 @@ <dimen name="notification_padding_end">12dp</dimen> <!-- notification_padding_end + (icon_size - footer_icon_size) / 2 --> <dimen name="notification_footer_icon_row_padding">15dp</dimen> <dimen name="notification_header_height">32dp</dimen> <dimen name="notification_main_height">96dp</dimen> <dimen name="notification_header_height">36dp</dimen> <dimen name="notification_main_height">84dp</dimen> <dimen name="notification_footer_height">32dp</dimen> <!-- How much space to keep as padding for the last notification when the footer collapses --> <dimen name="notification_empty_footer_height">6dp</dimen> <dimen name="notification_header_text_size">13sp</dimen> <dimen name="notification_header_count_text_size">12sp</dimen> <dimen name="notification_main_title_size">16sp</dimen> Loading
src/com/android/launcher3/notification/NotificationFooterLayout.java +4 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,9 @@ public class NotificationFooterLayout extends FrameLayout { PopupContainerWithArrow popup = PopupContainerWithArrow.getOpen( Launcher.getLauncher(getContext())); if (popup != null) { Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight(), final int newHeight = getResources().getDimensionPixelSize( R.dimen.notification_empty_footer_height); Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight() - newHeight, getResources().getInteger(R.integer.config_removeNotificationViewDuration)); collapseFooter.addListener(new AnimatorListenerAdapter() { @Override Loading @@ -208,7 +210,7 @@ public class NotificationFooterLayout extends FrameLayout { ((ViewGroup) getParent()).findViewById(R.id.divider).setVisibility(GONE); // Keep view around because gutter is aligned to it, but remove height to // both hide the view and keep calculations correct for last dismissal. getLayoutParams().height = 0; getLayoutParams().height = newHeight; requestLayout(); } }); Loading
src/com/android/launcher3/notification/NotificationItemView.java +12 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading