fix: restore native conversation row text layout

This commit is contained in:
kris
2026-03-29 17:54:34 +08:00
parent e051a49f7a
commit e9ab62e94d
2 changed files with 70 additions and 9 deletions

View File

@@ -570,7 +570,7 @@ public final class BossUi {
trailingColumn.setGravity(Gravity.END);
trailingColumn.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
LinearLayout.LayoutParams.WRAP_CONTENT
));
if (!TextUtils.isEmpty(row.topPinnedLabel)) {
@@ -581,6 +581,10 @@ public final class BossUi {
pinnedView.setTextColor(context.getColor(R.color.boss_green));
pinnedView.setBackground(createRoundedBackground(Color.parseColor("#E7F7EE"), dp(context, 9)));
pinnedView.setPadding(dp(context, 7), dp(context, 3), dp(context, 7), dp(context, 3));
pinnedView.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
));
trailingColumn.addView(pinnedView);
}
@@ -589,6 +593,10 @@ public final class BossUi {
timeView.setTextSize(12);
timeView.setTextColor(context.getColor(R.color.boss_text_muted));
timeView.setPadding(0, dp(context, TextUtils.isEmpty(row.topPinnedLabel) ? 2 : 8), 0, 0);
timeView.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
));
trailingColumn.addView(timeView);
if (row.unreadCount > 0) {
@@ -610,14 +618,6 @@ public final class BossUi {
trailingColumn.addView(unreadView);
}
View spacer = new View(context);
spacer.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
0,
1f
));
trailingColumn.addView(spacer);
LinearLayout activityWrap = new LinearLayout(context);
activityWrap.setOrientation(LinearLayout.HORIZONTAL);
activityWrap.setGravity(Gravity.END | Gravity.CENTER_VERTICAL);