diff --git a/android/app/src/main/java/com/hyzq/boss/BossUi.java b/android/app/src/main/java/com/hyzq/boss/BossUi.java index 8114b47..b588fc2 100644 --- a/android/app/src/main/java/com/hyzq/boss/BossUi.java +++ b/android/app/src/main/java/com/hyzq/boss/BossUi.java @@ -103,12 +103,12 @@ public final class BossUi { if (style == TopActionButtonStyle.COMPACT_ICON) { button.setBackgroundResource(R.drawable.bg_secondary_button); button.setTextColor(context.getColor(R.color.boss_text_primary)); - button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20); - button.setMinWidth(dp(context, 38)); - button.setMinimumWidth(dp(context, 38)); - button.setMinHeight(dp(context, 36)); - button.setMinimumHeight(dp(context, 36)); - button.setPadding(dp(context, 12), dp(context, 6), dp(context, 12), dp(context, 6)); + button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); + button.setMinWidth(dp(context, 34)); + button.setMinimumWidth(dp(context, 34)); + button.setMinHeight(dp(context, 34)); + button.setMinimumHeight(dp(context, 34)); + button.setPadding(dp(context, 10), dp(context, 5), dp(context, 10), dp(context, 5)); return; } @@ -119,19 +119,19 @@ public final class BossUi { button.setBackgroundResource(R.drawable.bg_secondary_button); button.setTextColor(context.getColor(R.color.boss_text_primary)); } - button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14); + button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 13); button.setMinWidth(0); button.setMinimumWidth(0); button.setMinHeight(0); button.setMinimumHeight(0); - button.setPadding(dp(context, 12), dp(context, 8), dp(context, 12), dp(context, 8)); + button.setPadding(dp(context, 10), dp(context, 7), dp(context, 10), dp(context, 7)); } public static void applyTopIconButtonStyle(Context context, ImageButton button) { button.setBackgroundResource(R.drawable.bg_top_icon_button); - button.setMinimumWidth(dp(context, 36)); - button.setMinimumHeight(dp(context, 36)); - button.setPadding(dp(context, 7), dp(context, 7), dp(context, 7), dp(context, 7)); + button.setMinimumWidth(dp(context, 34)); + button.setMinimumHeight(dp(context, 34)); + button.setPadding(dp(context, 6), dp(context, 6), dp(context, 6), dp(context, 6)); ImageViewCompat.setImageTintList(button, ColorStateList.valueOf(context.getColor(R.color.boss_text_primary))); } @@ -237,7 +237,7 @@ public final class BossUi { ); params.bottomMargin = dp(context, 1); row.setLayoutParams(params); - row.setPadding(dp(context, 14), dp(context, 10), dp(context, 14), dp(context, 10)); + row.setPadding(dp(context, 12), dp(context, 9), dp(context, 12), dp(context, 9)); row.setBackgroundResource(R.drawable.bg_list_row); if (listener != null) { row.setClickable(true); @@ -256,7 +256,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(title); - titleView.setTextSize(16); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); textWrap.addView(titleView); @@ -264,7 +264,7 @@ public final class BossUi { if (!TextUtils.isEmpty(subtitle)) { TextView subtitleView = new TextView(context); subtitleView.setText(subtitle); - subtitleView.setTextSize(13); + subtitleView.setTextSize(12); subtitleView.setTextColor(context.getColor(R.color.boss_text_muted)); subtitleView.setPadding(0, dp(context, 4), 0, 0); textWrap.addView(subtitleView); @@ -288,7 +288,7 @@ public final class BossUi { if (!TextUtils.isEmpty(badge)) { TextView badgeView = new TextView(context); badgeView.setText(badge); - badgeView.setTextSize(12); + badgeView.setTextSize(10); badgeView.setTextColor(context.getColor(R.color.boss_green)); badgeView.setBackgroundResource(R.drawable.bg_tab_active); badgeView.setPadding(dp(context, 8), dp(context, 2), dp(context, 8), dp(context, 2)); @@ -298,7 +298,7 @@ public final class BossUi { if (listener != null) { TextView arrowView = new TextView(context); arrowView.setText("›"); - arrowView.setTextSize(18); + arrowView.setTextSize(14); arrowView.setTextColor(context.getColor(R.color.boss_text_soft)); arrowView.setPadding(dp(context, 10), dp(context, 4), 0, 0); accessoryWrap.addView(arrowView); @@ -337,7 +337,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(title); - titleView.setTextSize(18); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); @@ -349,7 +349,7 @@ public final class BossUi { TextView metaView = new TextView(context); metaView.setText(meta); - metaView.setTextSize(12); + metaView.setTextSize(11); metaView.setTextColor(context.getColor(R.color.boss_text_muted)); metaView.setPadding(0, dp(context, 10), 0, 0); @@ -380,7 +380,7 @@ public final class BossUi { LinearLayout row = buildListRow(context, title, subtitle, meta, badge, listener); row.setBackgroundColor(Color.WHITE); row.setElevation(0f); - row.setPadding(dp(context, 14), dp(context, 10), dp(context, 14), dp(context, 10)); + row.setPadding(dp(context, 12), dp(context, 9), dp(context, 12), dp(context, 9)); return row; } @@ -399,7 +399,7 @@ public final class BossUi { ); row.setLayoutParams(params); row.setBackgroundColor(Color.WHITE); - row.setPadding(dp(context, 14), dp(context, 10), dp(context, 14), dp(context, 10)); + row.setPadding(dp(context, 12), dp(context, 9), dp(context, 12), dp(context, 9)); LinearLayout textWrap = new LinearLayout(context); textWrap.setOrientation(LinearLayout.VERTICAL); @@ -411,7 +411,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(title); - titleView.setTextSize(16); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); textWrap.addView(titleView); @@ -419,7 +419,7 @@ public final class BossUi { if (!TextUtils.isEmpty(subtitle)) { TextView subtitleView = new TextView(context); subtitleView.setText(subtitle); - subtitleView.setTextSize(13); + subtitleView.setTextSize(12); subtitleView.setTextColor(context.getColor(R.color.boss_text_muted)); subtitleView.setPadding(0, dp(context, 4), 0, 0); textWrap.addView(subtitleView); @@ -456,19 +456,19 @@ public final class BossUi { ); params.bottomMargin = dp(context, 10); card.setLayoutParams(params); - card.setPadding(dp(context, 16), dp(context, 14), dp(context, 16), dp(context, 14)); + card.setPadding(dp(context, 14), dp(context, 12), dp(context, 14), dp(context, 12)); card.setBackgroundColor(Color.WHITE); card.setElevation(0f); TextView avatar = new TextView(context); - LinearLayout.LayoutParams avatarParams = new LinearLayout.LayoutParams(dp(context, 56), dp(context, 56)); + LinearLayout.LayoutParams avatarParams = new LinearLayout.LayoutParams(dp(context, 52), dp(context, 52)); avatar.setLayoutParams(avatarParams); avatar.setGravity(Gravity.CENTER); avatar.setText(firstLetter(name)); - avatar.setTextSize(24); + avatar.setTextSize(18); avatar.setTypeface(Typeface.DEFAULT_BOLD); avatar.setTextColor(context.getColor(R.color.boss_green)); - avatar.setBackground(createRoundedBackground(Color.parseColor("#DFF3E8"), dp(context, 28))); + avatar.setBackground(createRoundedBackground(Color.parseColor("#DFF3E8"), dp(context, 26))); card.addView(avatar); LinearLayout textWrap = new LinearLayout(context); @@ -483,14 +483,14 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(TextUtils.isEmpty(name) ? "我的" : name); - titleView.setTextSize(20); + titleView.setTextSize(18); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); textWrap.addView(titleView); TextView subtitleView = new TextView(context); subtitleView.setText(subtitle); - subtitleView.setTextSize(13); + subtitleView.setTextSize(12); subtitleView.setTextColor(context.getColor(R.color.boss_text_muted)); subtitleView.setPadding(0, dp(context, 5), 0, 0); textWrap.addView(subtitleView); @@ -524,7 +524,7 @@ public final class BossUi { params.rightMargin = dp(context, 12); params.bottomMargin = dp(context, 10); cell.setLayoutParams(params); - cell.setPadding(dp(context, 16), dp(context, 14), dp(context, 16), dp(context, 14)); + cell.setPadding(dp(context, 14), dp(context, 12), dp(context, 14), dp(context, 12)); cell.setBackground(createRoundedBackground(Color.WHITE, dp(context, 18))); TextView labelView = new TextView(context); @@ -569,7 +569,7 @@ public final class BossUi { params.rightMargin = dp(context, 12); params.bottomMargin = dp(context, 1); card.setLayoutParams(params); - card.setPadding(dp(context, 12), dp(context, 10), dp(context, 12), dp(context, 10)); + card.setPadding(dp(context, 12), dp(context, 9), dp(context, 12), dp(context, 9)); card.setBackgroundColor(Color.WHITE); card.setElevation(0f); if (listener != null) { @@ -582,15 +582,15 @@ public final class BossUi { } FrameLayout avatarWrap = new FrameLayout(context); - LinearLayout.LayoutParams avatarWrapParams = new LinearLayout.LayoutParams(dp(context, 48), dp(context, 48)); + LinearLayout.LayoutParams avatarWrapParams = new LinearLayout.LayoutParams(dp(context, 44), dp(context, 44)); avatarWrap.setLayoutParams(avatarWrapParams); TextView avatar = new TextView(context); - FrameLayout.LayoutParams avatarParams = new FrameLayout.LayoutParams(dp(context, 44), dp(context, 44)); + FrameLayout.LayoutParams avatarParams = new FrameLayout.LayoutParams(dp(context, 40), dp(context, 40)); avatar.setLayoutParams(avatarParams); avatar.setGravity(Gravity.CENTER); avatar.setText(firstLetter(firstNonEmpty(row.avatarLabel, row.title, "设"))); - avatar.setTextSize(18); + avatar.setTextSize(16); avatar.setTypeface(Typeface.DEFAULT_BOLD); avatar.setTextColor(resolveDeviceAccentColor(row.statusKey)); avatar.setBackground(createRoundedBackground(resolveDeviceAvatarBackground(row.statusKey), dp(context, 18))); @@ -617,7 +617,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(TextUtils.isEmpty(row.title) ? "设备" : row.title); - titleView.setTextSize(16); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); titleView.setMaxLines(1); @@ -647,7 +647,7 @@ public final class BossUi { if (listener != null) { TextView arrowView = new TextView(context); arrowView.setText("›"); - arrowView.setTextSize(18); + arrowView.setTextSize(14); arrowView.setTextColor(context.getColor(R.color.boss_text_soft)); arrowView.setPadding(dp(context, 8), 0, 0, 0); card.addView(arrowView); @@ -671,12 +671,12 @@ public final class BossUi { params.rightMargin = dp(context, 12); params.bottomMargin = dp(context, 12); card.setLayoutParams(params); - card.setPadding(dp(context, 16), dp(context, 16), dp(context, 16), dp(context, 16)); + card.setPadding(dp(context, 14), dp(context, 14), dp(context, 14), dp(context, 14)); card.setBackground(createRoundedBackground(Color.parseColor("#E7F5ED"), dp(context, 18))); TextView titleView = new TextView(context); titleView.setText(title); - titleView.setTextSize(16); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); card.addView(titleView); @@ -720,7 +720,7 @@ public final class BossUi { 1f ); if (i > 0) { - buttonParams.leftMargin = dp(context, 8); + buttonParams.leftMargin = dp(context, 6); } button.setLayoutParams(buttonParams); row.addView(button); @@ -732,8 +732,8 @@ public final class BossUi { Button button = new Button(context); button.setText(label); button.setAllCaps(false); - button.setTextSize(13); - button.setPadding(dp(context, 10), dp(context, 10), dp(context, 10), dp(context, 10)); + button.setTextSize(12); + button.setPadding(dp(context, 9), dp(context, 8), dp(context, 9), dp(context, 8)); button.setTextColor(context.getColor(primary ? R.color.boss_surface : R.color.boss_green)); button.setBackgroundResource(primary ? R.drawable.bg_primary_button : R.drawable.bg_secondary_button); return button; @@ -774,7 +774,7 @@ public final class BossUi { ); params.bottomMargin = dp(context, 1); card.setLayoutParams(params); - card.setPadding(dp(context, 14), dp(context, 8), dp(context, 14), dp(context, 8)); + card.setPadding(dp(context, 12), dp(context, 6), dp(context, 12), dp(context, 6)); card.setBackgroundColor(highlighted ? Color.parseColor("#EAF8F0") : row.pinnedConversation ? PINNED_ROW_BG : Color.WHITE); card.setElevation(0f); if (listener != null) { @@ -795,13 +795,13 @@ public final class BossUi { LinearLayout.LayoutParams.WRAP_CONTENT, 1f ); - centerParams.leftMargin = dp(context, 10); - centerParams.rightMargin = dp(context, 8); + centerParams.leftMargin = dp(context, 9); + centerParams.rightMargin = dp(context, 7); centerColumn.setLayoutParams(centerParams); TextView titleView = new TextView(context); titleView.setText(TextUtils.isEmpty(row.threadTitle) ? "未命名会话" : row.threadTitle); - titleView.setTextSize(15); + titleView.setTextSize(14); titleView.setIncludeFontPadding(false); titleView.setGravity(Gravity.CENTER_VERTICAL); titleView.setTypeface(Typeface.DEFAULT_BOLD); @@ -810,13 +810,13 @@ public final class BossUi { titleView.setEllipsize(TextUtils.TruncateAt.END); titleView.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, - dp(context, 22) + dp(context, 20) )); centerColumn.addView(titleView); TextView previewView = new TextView(context); previewView.setText(buildConversationPreviewText(row.folderLabel, row.lastMessagePreview)); - previewView.setTextSize(12); + previewView.setTextSize(11); previewView.setIncludeFontPadding(false); previewView.setGravity(Gravity.CENTER_VERTICAL); previewView.setTextColor(context.getColor(R.color.boss_text_soft)); @@ -825,7 +825,7 @@ public final class BossUi { previewView.setEllipsize(TextUtils.TruncateAt.END); previewView.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, - dp(context, 20) + dp(context, 18) )); centerColumn.addView(previewView); @@ -1090,7 +1090,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText("暂无内容"); - titleView.setTextSize(16); + titleView.setTextSize(14); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); card.addView(titleView); @@ -1153,7 +1153,7 @@ public final class BossUi { TextView bodyView = new TextView(context); bodyView.setText(BossMarkdown.render(context, body, outgoing)); - bodyView.setTextSize(15); + bodyView.setTextSize(14); bodyView.setLineSpacing(0f, 1.34f); bodyView.setTextColor(context.getColor(outgoing ? R.color.boss_surface : R.color.boss_text_primary)); bodyView.setMaxWidth(maxBubbleWidth); @@ -1225,7 +1225,7 @@ public final class BossUi { header.addView(titleView); TextView arrowView = new TextView(context); - arrowView.setTextSize(16); + arrowView.setTextSize(14); arrowView.setTypeface(Typeface.DEFAULT_BOLD); arrowView.setTextColor(context.getColor(R.color.boss_text_muted)); arrowView.setPadding(dp(context, 8), 0, 0, 0); @@ -1332,7 +1332,7 @@ public final class BossUi { titleRow.addView(title); TextView pin = new TextView(context); pin.setText("◆"); - pin.setTextSize(18); + pin.setTextSize(14); pin.setTextColor(Color.parseColor("#9AA09D")); titleRow.addView(pin); card.addView(titleRow); @@ -1940,7 +1940,7 @@ public final class BossUi { check.setLayoutParams(checkParams); check.setGravity(Gravity.CENTER); check.setText("✓"); - check.setTextSize(15); + check.setTextSize(12); check.setTypeface(Typeface.DEFAULT_BOLD); int color = "failed".equals(status) ? Color.parseColor("#E44B4B") : "running".equals(status) ? Color.parseColor("#1EC76F") : Color.parseColor("#9AA09D"); @@ -1953,7 +1953,7 @@ public final class BossUi { bodyParams.leftMargin = dp(context, 12); body.setLayoutParams(bodyParams); body.setText(text); - body.setTextSize(18); + body.setTextSize(14); body.setLineSpacing(0f, 1.22f); body.setTextColor(context.getColor(R.color.boss_text_primary)); row.addView(body); @@ -1976,7 +1976,7 @@ public final class BossUi { private static TextView sectionTitle(Context context, String text) { TextView view = new TextView(context); view.setText(text); - view.setTextSize(17); + view.setTextSize(14); view.setTypeface(Typeface.DEFAULT_BOLD); view.setTextColor(Color.parseColor("#8B918F")); return view; @@ -2003,20 +2003,20 @@ public final class BossUi { TextView icon = new TextView(context); icon.setText(iconText); icon.setGravity(Gravity.CENTER); - icon.setTextSize(18); + icon.setTextSize(15); icon.setTextColor(muted ? Color.parseColor("#9AA09D") : context.getColor(R.color.boss_text_primary)); row.addView(icon, new LinearLayout.LayoutParams(dp(context, 34), LinearLayout.LayoutParams.WRAP_CONTENT)); TextView labelView = new TextView(context); labelView.setText(label); - labelView.setTextSize(17); + labelView.setTextSize(14); labelView.setTextColor(muted ? Color.parseColor("#8B918F") : context.getColor(R.color.boss_text_primary)); row.addView(labelView, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f)); if (!TextUtils.isEmpty(value)) { TextView valueView = new TextView(context); valueView.setText(value); - valueView.setTextSize(16); + valueView.setTextSize(13); valueView.setTextColor(valueIsChange ? Color.parseColor("#00A94F") : context.getColor(R.color.boss_text_muted)); row.addView(valueView); } @@ -2032,13 +2032,13 @@ public final class BossUi { TextView icon = new TextView(context); icon.setText("⊞"); icon.setGravity(Gravity.CENTER); - icon.setTextSize(18); + icon.setTextSize(15); icon.setTextColor(context.getColor(R.color.boss_text_primary)); row.addView(icon, new LinearLayout.LayoutParams(dp(context, 34), LinearLayout.LayoutParams.WRAP_CONTENT)); TextView labelView = new TextView(context); labelView.setText("变更"); - labelView.setTextSize(17); + labelView.setTextSize(14); labelView.setTextColor(context.getColor(R.color.boss_text_primary)); row.addView(labelView, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f)); @@ -2046,7 +2046,7 @@ public final class BossUi { if (additions > 0) { TextView additionsView = new TextView(context); additionsView.setText("+" + String.format(Locale.US, "%,d", additions)); - additionsView.setTextSize(16); + additionsView.setTextSize(13); additionsView.setTextColor(Color.parseColor("#00A94F")); row.addView(additionsView); } @@ -2054,7 +2054,7 @@ public final class BossUi { if (deletions > 0) { TextView deletionsView = new TextView(context); deletionsView.setText("-" + String.format(Locale.US, "%,d", deletions)); - deletionsView.setTextSize(16); + deletionsView.setTextSize(13); deletionsView.setTextColor(Color.parseColor("#C52828")); LinearLayout.LayoutParams deletionParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, @@ -2148,7 +2148,7 @@ public final class BossUi { icon.setLayoutParams(iconParams); icon.setGravity(Gravity.CENTER); icon.setText("文"); - icon.setTextSize(15); + icon.setTextSize(13); icon.setTypeface(Typeface.DEFAULT_BOLD); icon.setTextColor(context.getColor(R.color.boss_green)); icon.setBackground(createRoundedBackground(Color.parseColor("#E8F6ED"), dp(context, 12))); @@ -2298,7 +2298,7 @@ public final class BossUi { TextView titleView = new TextView(context); titleView.setText(TextUtils.isEmpty(cardTitle) ? "聊天记录" : cardTitle); - titleView.setTextSize(15); + titleView.setTextSize(13); titleView.setTypeface(Typeface.DEFAULT_BOLD); titleView.setTextColor(context.getColor(R.color.boss_text_primary)); titleView.setPadding(0, dp(context, 6), 0, 0); @@ -2495,7 +2495,7 @@ public final class BossUi { private static TextView buildAttachmentPrimaryText(Context context, String text) { TextView primary = new TextView(context); primary.setText(TextUtils.isEmpty(text) ? "未命名附件" : text); - primary.setTextSize(15); + primary.setTextSize(13); primary.setTypeface(Typeface.DEFAULT_BOLD); primary.setTextColor(context.getColor(R.color.boss_text_primary)); primary.setMaxLines(2); @@ -2506,7 +2506,7 @@ public final class BossUi { private static TextView buildAttachmentSecondaryText(Context context, String text) { TextView secondary = new TextView(context); secondary.setText(TextUtils.isEmpty(text) ? "已发送" : text); - secondary.setTextSize(13); + secondary.setTextSize(11); secondary.setTextColor(context.getColor(R.color.boss_text_muted)); secondary.setPadding(0, dp(context, 6), 0, 0); return secondary; @@ -2560,29 +2560,29 @@ public final class BossUi { firstNonEmpty(row.avatarPrimary, row.threadTitle, "会"), AVATAR_BG_COLORS[0], Color.WHITE, - 44 + 40 ); } FrameLayout groupWrap = new FrameLayout(context); - LinearLayout.LayoutParams wrapParams = new LinearLayout.LayoutParams(dp(context, 44), dp(context, 44)); + LinearLayout.LayoutParams wrapParams = new LinearLayout.LayoutParams(dp(context, 40), dp(context, 40)); groupWrap.setLayoutParams(wrapParams); - GradientDrawable bg = createRoundedBackground(Color.parseColor("#F2F6F3"), dp(context, 15)); + GradientDrawable bg = createRoundedBackground(Color.parseColor("#F2F6F3"), dp(context, 14)); bg.setStroke(dp(context, 1), Color.parseColor("#E5ECE7")); groupWrap.setBackground(bg); int visibleCount = Math.min(row.groupAvatarMembers.length, 4); if (visibleCount == 0) { - groupWrap.addView(buildCenteredAvatarTile(context, "群", AVATAR_BG_COLORS[1], 28, 8, 8)); + groupWrap.addView(buildCenteredAvatarTile(context, "群", AVATAR_BG_COLORS[1], 26, 7, 7)); return groupWrap; } int[][] offsets = { {4, 4}, - {22, 4}, - {4, 22}, - {22, 22} + {21, 4}, + {4, 21}, + {21, 21} }; for (int i = 0; i < visibleCount; i++) { WechatSurfaceMapper.GroupAvatarMember member = row.groupAvatarMembers[i]; @@ -2590,7 +2590,7 @@ public final class BossUi { context, firstNonEmpty(member.avatarLabel, member.title, "群"), AVATAR_BG_COLORS[(i + 1) % AVATAR_BG_COLORS.length], - 18, + 16, offsets[i][0], offsets[i][1] )); @@ -2610,7 +2610,7 @@ public final class BossUi { avatarView.setLayoutParams(avatarParams); avatarView.setGravity(Gravity.CENTER); avatarView.setText(firstLetter(labelSource)); - avatarView.setTextSize(sizeDp >= 44 ? 18 : 10); + avatarView.setTextSize(sizeDp >= 40 ? 16 : 9); avatarView.setTypeface(Typeface.DEFAULT_BOLD); avatarView.setTextColor(textColor); avatarView.setBackground(createRoundedBackground(backgroundColor, dp(context, sizeDp / 2))); diff --git a/android/app/src/main/java/com/hyzq/boss/MainActivity.java b/android/app/src/main/java/com/hyzq/boss/MainActivity.java index aa9dc05..8cef71e 100644 --- a/android/app/src/main/java/com/hyzq/boss/MainActivity.java +++ b/android/app/src/main/java/com/hyzq/boss/MainActivity.java @@ -1239,18 +1239,18 @@ public class MainActivity extends AppCompatActivity { int color = getColor(active ? R.color.boss_green : R.color.boss_text_muted); button.setBackgroundColor(Color.TRANSPARENT); button.setTextColor(color); - button.setTextSize(11); + button.setTextSize(10); button.setAllCaps(false); button.setGravity(android.view.Gravity.CENTER); Drawable topIcon = getDrawable(iconRes); if (topIcon != null) { - int iconSize = BossUi.dp(this, 20); + int iconSize = BossUi.dp(this, 18); topIcon.setBounds(0, 0, iconSize, iconSize); } button.setCompoundDrawables(null, topIcon, null, null); button.setCompoundDrawablePadding(BossUi.dp(this, 2)); button.setCompoundDrawableTintList(ColorStateList.valueOf(color)); - button.setPadding(0, BossUi.dp(this, 4), 0, BossUi.dp(this, 2)); + button.setPadding(0, BossUi.dp(this, 3), 0, BossUi.dp(this, 1)); } private void configureTopAction(WechatSurfaceMapper.RootTopAction action) { @@ -1580,14 +1580,14 @@ public class MainActivity extends AppCompatActivity { if (count > 0) { TextView selectedView = new TextView(this); selectedView.setText("已选 " + count + " 个线程"); - selectedView.setTextSize(13); + selectedView.setTextSize(12); selectedView.setTextColor(getColor(R.color.boss_text_primary)); summaryWrap.addView(selectedView); } if (count < 2) { TextView hintView = new TextView(this); hintView.setText("至少选择 2 个线程"); - hintView.setTextSize(12); + hintView.setTextSize(11); hintView.setTextColor(getColor(R.color.boss_text_muted)); if (count > 0) { hintView.setPadding(0, BossUi.dp(this, 4), 0, 0); diff --git a/android/app/src/main/java/com/hyzq/boss/ProjectDetailActivity.java b/android/app/src/main/java/com/hyzq/boss/ProjectDetailActivity.java index 824f279..b719e54 100644 --- a/android/app/src/main/java/com/hyzq/boss/ProjectDetailActivity.java +++ b/android/app/src/main/java/com/hyzq/boss/ProjectDetailActivity.java @@ -719,7 +719,7 @@ public class ProjectDetailActivity extends BossScreenActivity { private View buildDialogGuardInterventionView(JSONObject payload) { LinearLayout card = new LinearLayout(this); card.setOrientation(LinearLayout.VERTICAL); - int padding = BossUi.dp(this, 18); + int padding = BossUi.dp(this, 14); card.setPadding(padding, padding, padding, padding); TextView kicker = new TextView(this); @@ -730,7 +730,7 @@ public class ProjectDetailActivity extends BossScreenActivity { TextView title = new TextView(this); title.setText(dialogGuardTitle(payload)); - title.setTextSize(18); + title.setTextSize(14); title.setTypeface(Typeface.DEFAULT_BOLD); title.setTextColor(getColor(R.color.boss_text_primary)); LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams( @@ -742,7 +742,7 @@ public class ProjectDetailActivity extends BossScreenActivity { TextView summary = new TextView(this); summary.setText(payload.optString("summary", "绑定电脑上有一个弹窗需要你确认。")); - summary.setTextSize(15); + summary.setTextSize(13); summary.setTextColor(getColor(R.color.boss_text_primary)); summary.setLineSpacing(BossUi.dp(this, 2), 1.0f); LinearLayout.LayoutParams summaryParams = new LinearLayout.LayoutParams( @@ -754,7 +754,7 @@ public class ProjectDetailActivity extends BossScreenActivity { TextView meta = new TextView(this); meta.setText(dialogGuardMeta(payload)); - meta.setTextSize(13); + meta.setTextSize(11); meta.setTextColor(getColor(R.color.boss_text_muted)); LinearLayout.LayoutParams metaParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, @@ -777,7 +777,7 @@ public class ProjectDetailActivity extends BossScreenActivity { Button button = new Button(this); button.setAllCaps(false); button.setText(dialogGuardDecisionLabel(decision)); - button.setTextSize(15); + button.setTextSize(13); button.setTextColor(getColor("deny".equals(decision) || "cancel_task".equals(decision) ? android.R.color.holo_red_dark : R.color.boss_text_primary)); @@ -1436,7 +1436,7 @@ public class ProjectDetailActivity extends BossScreenActivity { avatar.setLayoutParams(avatarParams); avatar.setGravity(Gravity.CENTER); avatar.setText(candidate.label.startsWith("主") ? "主" : "审"); - avatar.setTextSize(15); + avatar.setTextSize(13); avatar.setTypeface(Typeface.DEFAULT_BOLD); avatar.setTextColor(candidate.label.startsWith("主") ? getColor(R.color.boss_green) : getColor(R.color.boss_text_primary)); GradientDrawable avatarBg = new GradientDrawable(); @@ -1451,7 +1451,7 @@ public class ProjectDetailActivity extends BossScreenActivity { TextView title = new TextView(this); title.setText(candidate.label); - title.setTextSize(16); + title.setTextSize(14); title.setTypeface(Typeface.DEFAULT_BOLD); title.setTextColor(getColor(R.color.boss_text_primary)); textWrap.addView(title); @@ -1564,7 +1564,7 @@ public class ProjectDetailActivity extends BossScreenActivity { TextView title = new TextView(this); title.setText("发送附件"); - title.setTextSize(16); + title.setTextSize(14); title.setTypeface(android.graphics.Typeface.DEFAULT_BOLD); title.setTextColor(getColor(R.color.boss_text_primary)); title.setPadding(0, 0, 0, BossUi.dp(this, 12)); @@ -1602,7 +1602,7 @@ public class ProjectDetailActivity extends BossScreenActivity { button.setGravity(Gravity.CENTER_VERTICAL | Gravity.START); button.setPadding(BossUi.dp(this, 16), 0, BossUi.dp(this, 16), 0); button.setText(label); - button.setTextSize(15); + button.setTextSize(13); button.setTextColor(getColor(R.color.boss_text_primary)); button.setOnClickListener(v -> { dialog.dismiss(); diff --git a/android/app/src/main/java/com/hyzq/boss/ProjectGoalsActivity.java b/android/app/src/main/java/com/hyzq/boss/ProjectGoalsActivity.java index 8e7547a..fc5e1ea 100644 --- a/android/app/src/main/java/com/hyzq/boss/ProjectGoalsActivity.java +++ b/android/app/src/main/java/com/hyzq/boss/ProjectGoalsActivity.java @@ -242,7 +242,7 @@ public class ProjectGoalsActivity extends BossScreenActivity { indicator.setLayoutParams(indicatorParams); indicator.setGravity(Gravity.CENTER); indicator.setText(completed ? "✓" : "○"); - indicator.setTextSize(18); + indicator.setTextSize(14); indicator.setTextColor(getColor(completed ? R.color.boss_green : R.color.boss_text_muted)); row.addView(indicator); @@ -257,14 +257,14 @@ public class ProjectGoalsActivity extends BossScreenActivity { TextView title = new TextView(this); title.setText(goal.optString("text", "未命名目标")); - title.setTextSize(16); + title.setTextSize(14); title.setTextColor(getColor(R.color.boss_text_primary)); title.setLineSpacing(0f, 1.2f); texts.addView(title); TextView note = new TextView(this); note.setText(goal.optString("note", "暂无备注")); - note.setTextSize(13); + note.setTextSize(12); note.setTextColor(getColor(R.color.boss_text_muted)); note.setPadding(0, BossUi.dp(this, 8), 0, 0); texts.addView(note); diff --git a/android/app/src/main/res/layout/activity_conversation_info.xml b/android/app/src/main/res/layout/activity_conversation_info.xml index 37b8450..72f6f44 100644 --- a/android/app/src/main/res/layout/activity_conversation_info.xml +++ b/android/app/src/main/res/layout/activity_conversation_info.xml @@ -12,18 +12,18 @@ android:background="@color/boss_surface" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingLeft="18dp" - android:paddingTop="10dp" - android:paddingRight="18dp" - android:paddingBottom="8dp"> + android:paddingLeft="16dp" + android:paddingTop="8dp" + android:paddingRight="16dp" + android:paddingBottom="7dp"> @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:text="会话信息" android:textColor="@color/boss_text_primary" - android:textSize="20sp" + android:textSize="18sp" android:textStyle="bold" /> + android:textSize="11sp" /> diff --git a/android/app/src/main/res/layout/activity_forward_target.xml b/android/app/src/main/res/layout/activity_forward_target.xml index 29ce0bb..e1202bf 100644 --- a/android/app/src/main/res/layout/activity_forward_target.xml +++ b/android/app/src/main/res/layout/activity_forward_target.xml @@ -12,18 +12,18 @@ android:background="@color/boss_surface" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingLeft="18dp" - android:paddingTop="10dp" - android:paddingRight="18dp" - android:paddingBottom="8dp"> + android:paddingLeft="16dp" + android:paddingTop="8dp" + android:paddingRight="16dp" + android:paddingBottom="7dp"> @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:text="标题" android:textColor="@color/boss_text_primary" - android:textSize="20sp" + android:textSize="18sp" android:textStyle="bold" /> + android:textSize="11sp" /> diff --git a/android/app/src/main/res/layout/activity_group_create.xml b/android/app/src/main/res/layout/activity_group_create.xml index 7c10494..81aa0c2 100644 --- a/android/app/src/main/res/layout/activity_group_create.xml +++ b/android/app/src/main/res/layout/activity_group_create.xml @@ -12,18 +12,18 @@ android:background="@color/boss_surface" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingLeft="18dp" - android:paddingTop="10dp" - android:paddingRight="18dp" - android:paddingBottom="8dp"> + android:paddingLeft="16dp" + android:paddingTop="8dp" + android:paddingRight="16dp" + android:paddingBottom="7dp"> @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:text="发起群聊" android:textColor="@color/boss_text_primary" - android:textSize="20sp" + android:textSize="18sp" android:textStyle="bold" /> + android:textSize="11sp" /> diff --git a/android/app/src/main/res/layout/activity_group_info.xml b/android/app/src/main/res/layout/activity_group_info.xml index 1c0553c..1e655e3 100644 --- a/android/app/src/main/res/layout/activity_group_info.xml +++ b/android/app/src/main/res/layout/activity_group_info.xml @@ -12,18 +12,18 @@ android:background="@color/boss_surface" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingLeft="18dp" - android:paddingTop="10dp" - android:paddingRight="18dp" - android:paddingBottom="8dp"> + android:paddingLeft="16dp" + android:paddingTop="8dp" + android:paddingRight="16dp" + android:paddingBottom="7dp"> @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:text="群资料" android:textColor="@color/boss_text_primary" - android:textSize="20sp" + android:textSize="18sp" android:textStyle="bold" /> + android:textSize="11sp" /> diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml index dba0141..069378d 100644 --- a/android/app/src/main/res/layout/activity_main.xml +++ b/android/app/src/main/res/layout/activity_main.xml @@ -22,23 +22,23 @@ android:paddingBottom="40dp"> + android:textSize="12sp" /> + android:textSize="14sp" /> + android:textSize="14sp" /> @@ -123,7 +123,7 @@ android:singleLine="true" android:textColor="@color/boss_text_primary" android:textColorHint="@color/boss_text_muted" - android:textSize="16sp" /> + android:textSize="14sp" />