diff --git a/packages/SystemUI/res/layout/people_space_placeholder_layout.xml b/packages/SystemUI/res/layout/people_space_placeholder_layout.xml index abb771b98667c..143c173998df1 100644 --- a/packages/SystemUI/res/layout/people_space_placeholder_layout.xml +++ b/packages/SystemUI/res/layout/people_space_placeholder_layout.xml @@ -34,7 +34,7 @@ diff --git a/packages/SystemUI/res/layout/people_tile_medium_with_content.xml b/packages/SystemUI/res/layout/people_tile_medium_with_content.xml index 1086a13613669..25a11657a92da 100644 --- a/packages/SystemUI/res/layout/people_tile_medium_with_content.xml +++ b/packages/SystemUI/res/layout/people_tile_medium_with_content.xml @@ -113,7 +113,6 @@ android:id="@+id/name" android:layout_gravity="start|center_vertical" android:gravity="start|center_vertical" - android:layout_weight="1" android:text="@string/empty_user_name" android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem" android:textColor="?android:attr/textColorPrimary" @@ -123,9 +122,14 @@ android:paddingEnd="8dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> + = getSizeInDp(R.dimen.required_width_for_medium)) { int spaceAvailableForPadding = mHeight - (getSizeInDp(R.dimen.avatar_size_for_medium) - + getLineHeightFromResource( + + 4 + getLineHeightFromResource( R.dimen.name_text_size_for_content)); if (DEBUG) { Log.d(TAG, "Medium view for mWidth: " + mWidth + " mHeight: " + mHeight @@ -558,9 +558,6 @@ public class PeopleTileViewHelper { } views.setViewVisibility(R.id.predefined_icon, View.VISIBLE); views.setTextViewText(R.id.text_content, statusText); - if (mLayoutSize == LAYOUT_LARGE) { - views.setInt(R.id.content, "setGravity", Gravity.BOTTOM); - } Icon statusIcon = status.getIcon(); if (statusIcon != null) { @@ -570,6 +567,7 @@ public class PeopleTileViewHelper { // Show 1-line subtext on large layout with status images. if (mLayoutSize == LAYOUT_LARGE) { if (DEBUG) Log.d(TAG, "Remove name for large"); + views.setInt(R.id.content, "setGravity", Gravity.BOTTOM); views.setViewVisibility(R.id.name, View.GONE); views.setColorAttr(R.id.text_content, "setTextColor", android.R.attr.textColorPrimary); @@ -830,6 +828,8 @@ public class PeopleTileViewHelper { views.setViewPadding(R.id.name, 0, 0, 0, mContext.getResources().getDimensionPixelSize( R.dimen.below_name_text_padding)); + // All large layouts besides missed calls & statuses with images, have gravity top. + views.setInt(R.id.content, "setGravity", Gravity.TOP); } // For all layouts except Missed Calls, ensure predefined icon is regular sized. diff --git a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java index f71a1c6385578..775a3afb7bde9 100644 --- a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java +++ b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java @@ -199,7 +199,8 @@ public class PeopleSpaceWidgetManager { "Received updated conversation: " + conversation.getShortcutInfo().getLabel()); } - updateWidgetsWithConversationChanged(conversation); + mBgExecutor.execute(() -> + updateWidgetsWithConversationChanged(conversation)); } }