fix: compact chat subpage typography

This commit is contained in:
AI Bot
2026-06-05 10:53:54 +08:00
parent eb8961fc3f
commit 9807c7a275
10 changed files with 148 additions and 40 deletions

View File

@@ -1145,6 +1145,7 @@ public final class BossUi {
TextView kindView = new TextView(context);
kindView.setText(kindLabel);
kindView.setTextSize(11);
kindView.setIncludeFontPadding(false);
kindView.setTypeface(Typeface.DEFAULT_BOLD);
kindView.setTextColor(context.getColor(outgoing ? R.color.boss_surface : R.color.boss_text_muted));
kindView.setPadding(0, 0, 0, dp(context, 6));
@@ -1154,7 +1155,8 @@ public final class BossUi {
TextView bodyView = new TextView(context);
bodyView.setText(BossMarkdown.render(context, body, outgoing));
bodyView.setTextSize(14);
bodyView.setLineSpacing(0f, 1.34f);
bodyView.setIncludeFontPadding(false);
bodyView.setLineSpacing(0f, 1.26f);
bodyView.setTextColor(context.getColor(outgoing ? R.color.boss_surface : R.color.boss_text_primary));
bodyView.setMaxWidth(maxBubbleWidth);
bodyView.setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY);
@@ -2275,6 +2277,7 @@ public final class BossUi {
String metaText = buildMessageMetaText(senderLabel, meta, outgoing);
metaView.setText(metaText);
metaView.setTextSize(11);
metaView.setIncludeFontPadding(false);
metaView.setTextColor(context.getColor(R.color.boss_text_soft));
metaView.setPadding(dp(context, 6), 0, dp(context, 6), dp(context, 4));
wrapper.addView(metaView);
@@ -2472,6 +2475,7 @@ public final class BossUi {
String metaText = buildMessageMetaText(senderLabel, meta, outgoing);
metaView.setText(metaText);
metaView.setTextSize(11);
metaView.setIncludeFontPadding(false);
metaView.setTextColor(context.getColor(R.color.boss_text_soft));
metaView.setPadding(dp(context, 6), 0, dp(context, 6), dp(context, 4));
wrapper.addView(metaView);

View File

@@ -1333,16 +1333,16 @@ public class ProjectDetailActivity extends BossScreenActivity {
private Button buildQuickActionButton(String label, boolean highlight) {
Button button = new Button(this);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0, BossUi.dp(this, 40), 1f);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0, BossUi.dp(this, 36), 1f);
if (quickActionsLayout.getChildCount() > 0) {
params.leftMargin = BossUi.dp(this, 8);
params.leftMargin = BossUi.dp(this, 6);
}
button.setLayoutParams(params);
button.setMinWidth(0);
button.setText(label);
button.setTextSize(14);
button.setTextSize(13);
button.setAllCaps(false);
button.setPadding(BossUi.dp(this, 12), 0, BossUi.dp(this, 12), 0);
button.setPadding(BossUi.dp(this, 10), 0, BossUi.dp(this, 10), 0);
button.setBackgroundResource(highlight ? R.drawable.bg_primary_button : R.drawable.bg_secondary_button);
button.setTextColor(getColor(highlight ? R.color.boss_surface : R.color.boss_text_primary));
return button;

View File

@@ -37,8 +37,11 @@
<TextView
android:id="@+id/screen_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="会话信息"
android:textColor="@color/boss_text_primary"
android:textSize="18sp"
@@ -46,9 +49,12 @@
<TextView
android:id="@+id/screen_subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="单线程会话信息页"
android:textColor="@color/boss_text_muted"
android:textSize="11sp" />

View File

@@ -37,8 +37,11 @@
<TextView
android:id="@+id/screen_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="标题"
android:textColor="@color/boss_text_primary"
android:textSize="18sp"
@@ -46,9 +49,12 @@
<TextView
android:id="@+id/screen_subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="副标题"
android:textColor="@color/boss_text_muted"
android:textSize="11sp" />

View File

@@ -37,8 +37,11 @@
<TextView
android:id="@+id/screen_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="发起群聊"
android:textColor="@color/boss_text_primary"
android:textSize="18sp"
@@ -46,9 +49,12 @@
<TextView
android:id="@+id/screen_subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="从当前会话选择其他线程"
android:textColor="@color/boss_text_muted"
android:textSize="11sp" />

View File

@@ -37,8 +37,11 @@
<TextView
android:id="@+id/screen_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="群资料"
android:textColor="@color/boss_text_primary"
android:textSize="18sp"
@@ -46,9 +49,12 @@
<TextView
android:id="@+id/screen_subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="群聊资料页"
android:textColor="@color/boss_text_muted"
android:textSize="11sp" />

View File

@@ -40,6 +40,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="项目详情"
android:textColor="@color/boss_text_primary"
@@ -48,9 +49,12 @@
<TextView
android:id="@+id/screen_subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="设备"
android:textColor="@color/boss_text_muted"
android:textSize="11sp" />
@@ -103,9 +107,9 @@
android:background="@color/boss_bg_app"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingTop="10dp"
android:paddingTop="8dp"
android:paddingRight="12dp"
android:paddingBottom="12dp">
android:paddingBottom="8dp">
<LinearLayout
android:id="@+id/project_chat_quick_actions"
@@ -137,15 +141,15 @@
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/project_chat_scroll_bottom"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|left"
android:layout_marginLeft="12dp"
android:layout_marginBottom="12dp"
android:background="@drawable/bg_chat_scroll_bottom_button"
android:contentDescription="回到底部"
android:elevation="8dp"
android:padding="12dp"
android:padding="11dp"
android:scaleType="center"
android:src="@drawable/ic_boss_arrow_down"
android:tint="@color/boss_text_primary"
@@ -173,18 +177,18 @@
android:gravity="bottom"
android:orientation="horizontal"
android:paddingLeft="12dp"
android:paddingTop="10dp"
android:paddingTop="8dp"
android:paddingRight="12dp"
android:paddingBottom="12dp">
android:paddingBottom="10dp">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/project_chat_attach"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="8dp"
android:background="@drawable/bg_secondary_button"
android:contentDescription="发送附件"
android:padding="12dp"
android:padding="10dp"
android:scaleType="center"
android:src="@drawable/ic_boss_add"
android:tint="@color/boss_text_primary" />
@@ -199,23 +203,25 @@
android:hint="输入消息"
android:inputType="textCapSentences|textMultiLine"
android:maxLines="4"
android:minHeight="44dp"
android:paddingLeft="14dp"
android:paddingTop="10dp"
android:paddingRight="14dp"
android:paddingBottom="10dp"
android:minHeight="40dp"
android:paddingLeft="12dp"
android:paddingTop="8dp"
android:paddingRight="12dp"
android:paddingBottom="8dp"
android:textColor="@color/boss_text_primary"
android:textColorHint="@color/boss_text_muted" />
android:textColorHint="@color/boss_text_muted"
android:textSize="14sp" />
<Button
android:id="@+id/project_chat_send"
android:layout_width="72dp"
android:layout_height="44dp"
android:layout_width="68dp"
android:layout_height="40dp"
android:layout_marginLeft="8dp"
android:background="@drawable/bg_primary_button"
android:text="发送"
android:textAllCaps="false"
android:textColor="@color/boss_surface"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
@@ -227,32 +233,34 @@
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="12dp"
android:paddingTop="10dp"
android:paddingTop="8dp"
android:paddingRight="12dp"
android:paddingBottom="12dp"
android:paddingBottom="10dp"
android:visibility="gone">
<Button
android:id="@+id/project_chat_multi_copy"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_height="40dp"
android:layout_marginRight="8dp"
android:layout_weight="1"
android:background="@drawable/bg_secondary_button"
android:text="复制"
android:textAllCaps="false"
android:textColor="@color/boss_text_primary"
android:textSize="13sp"
android:textStyle="bold" />
<Button
android:id="@+id/project_chat_multi_forward"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_height="40dp"
android:layout_weight="1"
android:background="@drawable/bg_primary_button"
android:text="转发"
android:textAllCaps="false"
android:textColor="@color/boss_surface"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>

View File

@@ -40,6 +40,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="标题"
android:textColor="@color/boss_text_primary"
@@ -52,6 +53,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="1"
android:text="副标题"
android:textColor="@color/boss_text_muted"