Merge "Fix conversation group spacing; keep stack to 120dp"
diff --git a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
index 335e0a4..43b1661 100644
--- a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
+++ b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
@@ -20,8 +20,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
- android:paddingTop="1dp"
- android:paddingBottom="1dp"
android:paddingEnd="12dp">
<FrameLayout
@@ -69,4 +67,4 @@
android:singleLine="true"
style="?attr/hybridNotificationTextStyle"
/>
-</com.android.systemui.statusbar.notification.row.HybridConversationNotificationView>
\ No newline at end of file
+</com.android.systemui.statusbar.notification.row.HybridConversationNotificationView>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 7eb25db..268088c 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -574,15 +574,13 @@
<dimen name="notification_shade_content_margin_horizontal">16dp</dimen>
<!-- The top margin for the notification children container in its non-expanded form. -->
- <dimen name="notification_children_container_margin_top">
- @*android:dimen/notification_content_margin_top
- </dimen>
+ <dimen name="notification_children_container_margin_top">48dp</dimen>
<!-- The height of the gap between adjacent notification sections. -->
<dimen name="notification_section_divider_height">@dimen/notification_side_paddings</dimen>
<!-- Size of the face pile shown on one-line (children of a group) conversation notifications -->
- <dimen name="conversation_single_line_face_pile_size">25dp</dimen>
+ <dimen name="conversation_single_line_face_pile_size">24dp</dimen>
<!-- Size of the avatars within a face pile shown on one-line (children of a group) conversation notifications -->
<dimen name="conversation_single_line_face_pile_avatar_size">17dp</dimen>
@@ -651,11 +649,14 @@
<dimen name="panel_overshoot_amount">16dp</dimen>
<!-- The padding between notification children when collapsed -->
- <dimen name="notification_children_padding">4dp</dimen>
+ <dimen name="notification_children_padding">8dp</dimen>
<!-- The padding on top of the first notification to the children container -->
<dimen name="notification_children_container_top_padding">8dp</dimen>
+ <!-- The padding on the bottom of the last group hybrid notification when collapsed -->
+ <dimen name="notification_children_collapsed_bottom_padding">16dp</dimen>
+
<!-- end margin for system icons if multi user switch is hidden -->
<dimen name="system_icons_switcher_hidden_expanded_margin">16dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
index a3fe47c..dad06d9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
@@ -81,7 +81,7 @@
private int mNotificationHeaderMargin;
private int mNotificationTopPadding;
- private float mCollapsedBottompadding;
+ private float mCollapsedBottomPadding;
private boolean mChildrenExpanded;
private ExpandableNotificationRow mContainingNotification;
private TextView mOverflowNumber;
@@ -140,17 +140,17 @@
private void initDimens() {
Resources res = getResources();
- mChildPadding = res.getDimensionPixelSize(R.dimen.notification_children_padding);
- mDividerHeight = res.getDimensionPixelSize(
+ mChildPadding = res.getDimensionPixelOffset(R.dimen.notification_children_padding);
+ mDividerHeight = res.getDimensionPixelOffset(
R.dimen.notification_children_container_divider_height);
mDividerAlpha = res.getFloat(R.dimen.notification_divider_alpha);
- mNotificationHeaderMargin = res.getDimensionPixelSize(
+ mNotificationHeaderMargin = res.getDimensionPixelOffset(
R.dimen.notification_children_container_margin_top);
- mNotificationTopPadding = res.getDimensionPixelSize(
+ mNotificationTopPadding = res.getDimensionPixelOffset(
R.dimen.notification_children_container_top_padding);
mHeaderHeight = mNotificationHeaderMargin + mNotificationTopPadding;
- mCollapsedBottompadding = res.getDimensionPixelSize(
- com.android.internal.R.dimen.notification_content_margin);
+ mCollapsedBottomPadding = res.getDimensionPixelOffset(
+ R.dimen.notification_children_collapsed_bottom_padding);
mEnableShadowOnChildNotifications =
res.getBoolean(R.bool.config_enableShadowOnChildNotifications);
mShowGroupCountInExpander =
@@ -159,7 +159,7 @@
res.getBoolean(R.bool.config_showDividersWhenGroupNotificationExpanded);
mHideDividersDuringExpand =
res.getBoolean(R.bool.config_hideDividersDuringExpand);
- mTranslationForHeader = res.getDimensionPixelSize(
+ mTranslationForHeader = res.getDimensionPixelOffset(
com.android.internal.R.dimen.notification_content_margin)
- mNotificationHeaderMargin;
mHybridGroupManager.initDimens();
@@ -560,10 +560,10 @@
visibleChildren++;
}
if (mUserLocked) {
- intrinsicHeight += NotificationUtils.interpolate(mCollapsedBottompadding, 0.0f,
+ intrinsicHeight += NotificationUtils.interpolate(mCollapsedBottomPadding, 0.0f,
expandFactor);
} else if (!childrenExpanded) {
- intrinsicHeight += mCollapsedBottompadding;
+ intrinsicHeight += mCollapsedBottomPadding;
}
return intrinsicHeight;
}
@@ -1163,7 +1163,7 @@
minExpandHeight += child.getSingleLineView().getHeight();
visibleChildren++;
}
- minExpandHeight += mCollapsedBottompadding;
+ minExpandHeight += mCollapsedBottomPadding;
return minExpandHeight;
}