Fix LTR & conversation updates on main thread
Test: locally tried LTR Bug: 190498032 Fixes: 189092212, 187526637 Change-Id: I8816ade464b12104c6cce37cc723753bef470f1f
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="20dp"
|
||||
android:gravity="bottom"
|
||||
android:gravity="start|bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
@@ -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" />
|
||||
<TextView
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
android:id="@+id/messages_count"
|
||||
android:gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.ListItem"
|
||||
|
||||
@@ -348,7 +348,7 @@ public class PeopleTileViewHelper {
|
||||
if (mWidth >= 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.
|
||||
|
||||
@@ -199,7 +199,8 @@ public class PeopleSpaceWidgetManager {
|
||||
"Received updated conversation: "
|
||||
+ conversation.getShortcutInfo().getLabel());
|
||||
}
|
||||
updateWidgetsWithConversationChanged(conversation);
|
||||
mBgExecutor.execute(() ->
|
||||
updateWidgetsWithConversationChanged(conversation));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user