diff --git a/core/java/com/android/internal/widget/ConversationLayout.java b/core/java/com/android/internal/widget/ConversationLayout.java
index 4e96ae7f79034..2c92b91035d7b 100644
--- a/core/java/com/android/internal/widget/ConversationLayout.java
+++ b/core/java/com/android/internal/widget/ConversationLayout.java
@@ -116,13 +116,13 @@ public class ConversationLayout extends FrameLayout
private ViewGroup mExpandButtonAndContentContainer;
private NotificationExpandButton mExpandButton;
private MessagingLinearLayout mImageMessageContainer;
- private int mBadgedSideMargins;
+ private int mBadgeProtrusion;
private int mConversationAvatarSize;
private int mConversationAvatarSizeExpanded;
private CachingIconView mIcon;
private CachingIconView mImportanceRingView;
- private int mExpandedGroupSideMargin;
- private int mExpandedGroupSideMarginFacePile;
+ private int mExpandedGroupBadgeProtrusion;
+ private int mExpandedGroupBadgeProtrusionFacePile;
private View mConversationFacePile;
private int mNotificationBackgroundColor;
private CharSequence mFallbackChatName;
@@ -251,8 +251,8 @@ public class ConversationLayout extends FrameLayout
R.dimen.conversation_header_expanded_padding_end);
mContentMarginEnd = getResources().getDimensionPixelSize(
R.dimen.notification_content_margin_end);
- mBadgedSideMargins = getResources().getDimensionPixelSize(
- R.dimen.conversation_badge_side_margin);
+ mBadgeProtrusion = getResources().getDimensionPixelSize(
+ R.dimen.conversation_badge_protrusion);
mConversationAvatarSize = getResources().getDimensionPixelSize(
R.dimen.conversation_avatar_size);
mConversationAvatarSizeExpanded = getResources().getDimensionPixelSize(
@@ -263,10 +263,10 @@ public class ConversationLayout extends FrameLayout
R.dimen.conversation_icon_container_top_padding);
mExpandedGroupMessagePadding = getResources().getDimensionPixelSize(
R.dimen.expanded_group_conversation_message_padding);
- mExpandedGroupSideMargin = getResources().getDimensionPixelSize(
- R.dimen.conversation_badge_side_margin_group_expanded);
- mExpandedGroupSideMarginFacePile = getResources().getDimensionPixelSize(
- R.dimen.conversation_badge_side_margin_group_expanded_face_pile);
+ mExpandedGroupBadgeProtrusion = getResources().getDimensionPixelSize(
+ R.dimen.conversation_badge_protrusion_group_expanded);
+ mExpandedGroupBadgeProtrusionFacePile = getResources().getDimensionPixelSize(
+ R.dimen.conversation_badge_protrusion_group_expanded_face_pile);
mConversationFacePile = findViewById(R.id.conversation_face_pile);
mFacePileAvatarSize = getResources().getDimensionPixelSize(
R.dimen.conversation_face_pile_avatar_size);
@@ -646,7 +646,7 @@ public class ConversationLayout extends FrameLayout
facepileAvatarSize = mFacePileAvatarSizeExpandedGroup;
facePileBackgroundSize = facepileAvatarSize + 2 * mFacePileProtectionWidthExpanded;
}
- LayoutParams layoutParams = (LayoutParams) mConversationIconView.getLayoutParams();
+ LayoutParams layoutParams = (LayoutParams) mConversationFacePile.getLayoutParams();
layoutParams.width = conversationAvatarSize;
layoutParams.height = conversationAvatarSize;
mConversationFacePile.setLayoutParams(layoutParams);
@@ -679,29 +679,35 @@ public class ConversationLayout extends FrameLayout
* update the icon position and sizing
*/
private void updateIconPositionAndSize() {
- int sidemargin;
+ int badgeProtrusion;
int conversationAvatarSize;
if (mIsOneToOne || mIsCollapsed) {
- sidemargin = mBadgedSideMargins;
+ badgeProtrusion = mBadgeProtrusion;
conversationAvatarSize = mConversationAvatarSize;
} else {
- sidemargin = mConversationFacePile.getVisibility() == VISIBLE
- ? mExpandedGroupSideMarginFacePile
- : mExpandedGroupSideMargin;
+ badgeProtrusion = mConversationFacePile.getVisibility() == VISIBLE
+ ? mExpandedGroupBadgeProtrusionFacePile
+ : mExpandedGroupBadgeProtrusion;
conversationAvatarSize = mConversationAvatarSizeExpanded;
}
- LayoutParams layoutParams =
- (LayoutParams) mConversationIconBadge.getLayoutParams();
- layoutParams.topMargin = sidemargin;
- layoutParams.setMarginStart(sidemargin);
- mConversationIconBadge.setLayoutParams(layoutParams);
if (mConversationIconView.getVisibility() == VISIBLE) {
- layoutParams = (LayoutParams) mConversationIconView.getLayoutParams();
+ LayoutParams layoutParams = (LayoutParams) mConversationIconView.getLayoutParams();
layoutParams.width = conversationAvatarSize;
layoutParams.height = conversationAvatarSize;
+ layoutParams.leftMargin = badgeProtrusion;
+ layoutParams.rightMargin = badgeProtrusion;
+ layoutParams.bottomMargin = badgeProtrusion;
mConversationIconView.setLayoutParams(layoutParams);
}
+
+ if (mConversationFacePile.getVisibility() == VISIBLE) {
+ LayoutParams layoutParams = (LayoutParams) mConversationFacePile.getLayoutParams();
+ layoutParams.leftMargin = badgeProtrusion;
+ layoutParams.rightMargin = badgeProtrusion;
+ layoutParams.bottomMargin = badgeProtrusion;
+ mConversationFacePile.setLayoutParams(layoutParams);
+ }
}
private void updatePaddingsBasedOnContentAvailability() {
diff --git a/core/res/res/layout/notification_template_conversation_icon_container.xml b/core/res/res/layout/notification_template_conversation_icon_container.xml
index a88ff0d104a61..0438dc5b5c811 100644
--- a/core/res/res/layout/notification_template_conversation_icon_container.xml
+++ b/core/res/res/layout/notification_template_conversation_icon_container.xml
@@ -36,11 +36,14 @@
android:layout_gravity="top|center_horizontal"
>
-
+
@@ -49,6 +52,9 @@
android:layout="@layout/conversation_face_pile_layout"
android:layout_width="@dimen/conversation_avatar_size"
android:layout_height="@dimen/conversation_avatar_size"
+ android:layout_marginLeft="@dimen/conversation_badge_protrusion"
+ android:layout_marginRight="@dimen/conversation_badge_protrusion"
+ android:layout_marginBottom="@dimen/conversation_badge_protrusion"
android:id="@+id/conversation_face_pile"
/>
@@ -56,8 +62,7 @@
android:id="@+id/conversation_icon_badge"
android:layout_width="@dimen/conversation_icon_size_badged"
android:layout_height="@dimen/conversation_icon_size_badged"
- android:layout_marginLeft="@dimen/conversation_badge_side_margin"
- android:layout_marginTop="@dimen/conversation_badge_side_margin"
+ android:layout_gravity="end|bottom"
android:clipChildren="false"
android:clipToPadding="false"
>
diff --git a/core/res/res/layout/notification_template_material_messaging.xml b/core/res/res/layout/notification_template_material_messaging.xml
index 3564f9755a5de..eb61ea45b4df0 100644
--- a/core/res/res/layout/notification_template_material_messaging.xml
+++ b/core/res/res/layout/notification_template_material_messaging.xml
@@ -199,13 +199,11 @@
android:id="@+id/notification_action_list_margin_target"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="-20dp"
android:clipChildren="false"
android:orientation="vertical">
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index ade8516a48e97..4f90a174fef76 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -776,8 +776,8 @@
88dp
12dp
-
- 32dp
+
+ 4dp
20dp
@@ -786,10 +786,10 @@
32dp
@dimen/conversation_face_pile_avatar_size
-
- @dimen/conversation_badge_side_margin
-
- @dimen/conversation_badge_side_margin
+
+ @dimen/conversation_badge_protrusion
+
+ @dimen/conversation_badge_protrusion
2dp
@@ -809,8 +809,8 @@
8dp
-
- 38dp
+
+ 40dp
4dp
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index b8f82b411969e..d8620a706fe2a 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4084,15 +4084,15 @@
-
+
-
-
+
+
diff --git a/packages/SystemUI/res/layout/notification_conversation_info.xml b/packages/SystemUI/res/layout/notification_conversation_info.xml
index c332f4cf7a392..2ec4e73145f54 100644
--- a/packages/SystemUI/res/layout/notification_conversation_info.xml
+++ b/packages/SystemUI/res/layout/notification_conversation_info.xml
@@ -45,11 +45,14 @@
android:layout_marginEnd="12dp"
>
-
+
@@ -58,8 +61,7 @@
android:id="@+id/conversation_icon_badge"
android:layout_width="@*android:dimen/conversation_icon_size_badged"
android:layout_height="@*android:dimen/conversation_icon_size_badged"
- android:layout_marginLeft="@*android:dimen/conversation_badge_side_margin"
- android:layout_marginTop="@*android:dimen/conversation_badge_side_margin"
+ android:layout_gravity="end|bottom"
android:clipChildren="false"
android:clipToPadding="false"
>