fix: align android typography with wechat density
This commit is contained in:
@@ -103,12 +103,12 @@ public final class BossUi {
|
|||||||
if (style == TopActionButtonStyle.COMPACT_ICON) {
|
if (style == TopActionButtonStyle.COMPACT_ICON) {
|
||||||
button.setBackgroundResource(R.drawable.bg_secondary_button);
|
button.setBackgroundResource(R.drawable.bg_secondary_button);
|
||||||
button.setTextColor(context.getColor(R.color.boss_text_primary));
|
button.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
|
button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
|
||||||
button.setMinWidth(dp(context, 38));
|
button.setMinWidth(dp(context, 34));
|
||||||
button.setMinimumWidth(dp(context, 38));
|
button.setMinimumWidth(dp(context, 34));
|
||||||
button.setMinHeight(dp(context, 36));
|
button.setMinHeight(dp(context, 34));
|
||||||
button.setMinimumHeight(dp(context, 36));
|
button.setMinimumHeight(dp(context, 34));
|
||||||
button.setPadding(dp(context, 12), dp(context, 6), dp(context, 12), dp(context, 6));
|
button.setPadding(dp(context, 10), dp(context, 5), dp(context, 10), dp(context, 5));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,19 +119,19 @@ public final class BossUi {
|
|||||||
button.setBackgroundResource(R.drawable.bg_secondary_button);
|
button.setBackgroundResource(R.drawable.bg_secondary_button);
|
||||||
button.setTextColor(context.getColor(R.color.boss_text_primary));
|
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.setMinWidth(0);
|
||||||
button.setMinimumWidth(0);
|
button.setMinimumWidth(0);
|
||||||
button.setMinHeight(0);
|
button.setMinHeight(0);
|
||||||
button.setMinimumHeight(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) {
|
public static void applyTopIconButtonStyle(Context context, ImageButton button) {
|
||||||
button.setBackgroundResource(R.drawable.bg_top_icon_button);
|
button.setBackgroundResource(R.drawable.bg_top_icon_button);
|
||||||
button.setMinimumWidth(dp(context, 36));
|
button.setMinimumWidth(dp(context, 34));
|
||||||
button.setMinimumHeight(dp(context, 36));
|
button.setMinimumHeight(dp(context, 34));
|
||||||
button.setPadding(dp(context, 7), dp(context, 7), dp(context, 7), dp(context, 7));
|
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)));
|
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);
|
params.bottomMargin = dp(context, 1);
|
||||||
row.setLayoutParams(params);
|
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);
|
row.setBackgroundResource(R.drawable.bg_list_row);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
row.setClickable(true);
|
row.setClickable(true);
|
||||||
@@ -256,7 +256,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(title);
|
titleView.setText(title);
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
textWrap.addView(titleView);
|
textWrap.addView(titleView);
|
||||||
@@ -264,7 +264,7 @@ public final class BossUi {
|
|||||||
if (!TextUtils.isEmpty(subtitle)) {
|
if (!TextUtils.isEmpty(subtitle)) {
|
||||||
TextView subtitleView = new TextView(context);
|
TextView subtitleView = new TextView(context);
|
||||||
subtitleView.setText(subtitle);
|
subtitleView.setText(subtitle);
|
||||||
subtitleView.setTextSize(13);
|
subtitleView.setTextSize(12);
|
||||||
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
subtitleView.setPadding(0, dp(context, 4), 0, 0);
|
subtitleView.setPadding(0, dp(context, 4), 0, 0);
|
||||||
textWrap.addView(subtitleView);
|
textWrap.addView(subtitleView);
|
||||||
@@ -288,7 +288,7 @@ public final class BossUi {
|
|||||||
if (!TextUtils.isEmpty(badge)) {
|
if (!TextUtils.isEmpty(badge)) {
|
||||||
TextView badgeView = new TextView(context);
|
TextView badgeView = new TextView(context);
|
||||||
badgeView.setText(badge);
|
badgeView.setText(badge);
|
||||||
badgeView.setTextSize(12);
|
badgeView.setTextSize(10);
|
||||||
badgeView.setTextColor(context.getColor(R.color.boss_green));
|
badgeView.setTextColor(context.getColor(R.color.boss_green));
|
||||||
badgeView.setBackgroundResource(R.drawable.bg_tab_active);
|
badgeView.setBackgroundResource(R.drawable.bg_tab_active);
|
||||||
badgeView.setPadding(dp(context, 8), dp(context, 2), dp(context, 8), dp(context, 2));
|
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) {
|
if (listener != null) {
|
||||||
TextView arrowView = new TextView(context);
|
TextView arrowView = new TextView(context);
|
||||||
arrowView.setText("›");
|
arrowView.setText("›");
|
||||||
arrowView.setTextSize(18);
|
arrowView.setTextSize(14);
|
||||||
arrowView.setTextColor(context.getColor(R.color.boss_text_soft));
|
arrowView.setTextColor(context.getColor(R.color.boss_text_soft));
|
||||||
arrowView.setPadding(dp(context, 10), dp(context, 4), 0, 0);
|
arrowView.setPadding(dp(context, 10), dp(context, 4), 0, 0);
|
||||||
accessoryWrap.addView(arrowView);
|
accessoryWrap.addView(arrowView);
|
||||||
@@ -337,7 +337,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(title);
|
titleView.setText(title);
|
||||||
titleView.setTextSize(18);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView metaView = new TextView(context);
|
TextView metaView = new TextView(context);
|
||||||
metaView.setText(meta);
|
metaView.setText(meta);
|
||||||
metaView.setTextSize(12);
|
metaView.setTextSize(11);
|
||||||
metaView.setTextColor(context.getColor(R.color.boss_text_muted));
|
metaView.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
metaView.setPadding(0, dp(context, 10), 0, 0);
|
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);
|
LinearLayout row = buildListRow(context, title, subtitle, meta, badge, listener);
|
||||||
row.setBackgroundColor(Color.WHITE);
|
row.setBackgroundColor(Color.WHITE);
|
||||||
row.setElevation(0f);
|
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;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ public final class BossUi {
|
|||||||
);
|
);
|
||||||
row.setLayoutParams(params);
|
row.setLayoutParams(params);
|
||||||
row.setBackgroundColor(Color.WHITE);
|
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);
|
LinearLayout textWrap = new LinearLayout(context);
|
||||||
textWrap.setOrientation(LinearLayout.VERTICAL);
|
textWrap.setOrientation(LinearLayout.VERTICAL);
|
||||||
@@ -411,7 +411,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(title);
|
titleView.setText(title);
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
textWrap.addView(titleView);
|
textWrap.addView(titleView);
|
||||||
@@ -419,7 +419,7 @@ public final class BossUi {
|
|||||||
if (!TextUtils.isEmpty(subtitle)) {
|
if (!TextUtils.isEmpty(subtitle)) {
|
||||||
TextView subtitleView = new TextView(context);
|
TextView subtitleView = new TextView(context);
|
||||||
subtitleView.setText(subtitle);
|
subtitleView.setText(subtitle);
|
||||||
subtitleView.setTextSize(13);
|
subtitleView.setTextSize(12);
|
||||||
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
subtitleView.setPadding(0, dp(context, 4), 0, 0);
|
subtitleView.setPadding(0, dp(context, 4), 0, 0);
|
||||||
textWrap.addView(subtitleView);
|
textWrap.addView(subtitleView);
|
||||||
@@ -456,19 +456,19 @@ public final class BossUi {
|
|||||||
);
|
);
|
||||||
params.bottomMargin = dp(context, 10);
|
params.bottomMargin = dp(context, 10);
|
||||||
card.setLayoutParams(params);
|
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.setBackgroundColor(Color.WHITE);
|
||||||
card.setElevation(0f);
|
card.setElevation(0f);
|
||||||
|
|
||||||
TextView avatar = new TextView(context);
|
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.setLayoutParams(avatarParams);
|
||||||
avatar.setGravity(Gravity.CENTER);
|
avatar.setGravity(Gravity.CENTER);
|
||||||
avatar.setText(firstLetter(name));
|
avatar.setText(firstLetter(name));
|
||||||
avatar.setTextSize(24);
|
avatar.setTextSize(18);
|
||||||
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
avatar.setTextColor(context.getColor(R.color.boss_green));
|
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);
|
card.addView(avatar);
|
||||||
|
|
||||||
LinearLayout textWrap = new LinearLayout(context);
|
LinearLayout textWrap = new LinearLayout(context);
|
||||||
@@ -483,14 +483,14 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(TextUtils.isEmpty(name) ? "我的" : name);
|
titleView.setText(TextUtils.isEmpty(name) ? "我的" : name);
|
||||||
titleView.setTextSize(20);
|
titleView.setTextSize(18);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
textWrap.addView(titleView);
|
textWrap.addView(titleView);
|
||||||
|
|
||||||
TextView subtitleView = new TextView(context);
|
TextView subtitleView = new TextView(context);
|
||||||
subtitleView.setText(subtitle);
|
subtitleView.setText(subtitle);
|
||||||
subtitleView.setTextSize(13);
|
subtitleView.setTextSize(12);
|
||||||
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
subtitleView.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
subtitleView.setPadding(0, dp(context, 5), 0, 0);
|
subtitleView.setPadding(0, dp(context, 5), 0, 0);
|
||||||
textWrap.addView(subtitleView);
|
textWrap.addView(subtitleView);
|
||||||
@@ -524,7 +524,7 @@ public final class BossUi {
|
|||||||
params.rightMargin = dp(context, 12);
|
params.rightMargin = dp(context, 12);
|
||||||
params.bottomMargin = dp(context, 10);
|
params.bottomMargin = dp(context, 10);
|
||||||
cell.setLayoutParams(params);
|
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)));
|
cell.setBackground(createRoundedBackground(Color.WHITE, dp(context, 18)));
|
||||||
|
|
||||||
TextView labelView = new TextView(context);
|
TextView labelView = new TextView(context);
|
||||||
@@ -569,7 +569,7 @@ public final class BossUi {
|
|||||||
params.rightMargin = dp(context, 12);
|
params.rightMargin = dp(context, 12);
|
||||||
params.bottomMargin = dp(context, 1);
|
params.bottomMargin = dp(context, 1);
|
||||||
card.setLayoutParams(params);
|
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.setBackgroundColor(Color.WHITE);
|
||||||
card.setElevation(0f);
|
card.setElevation(0f);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
@@ -582,15 +582,15 @@ public final class BossUi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FrameLayout avatarWrap = new FrameLayout(context);
|
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);
|
avatarWrap.setLayoutParams(avatarWrapParams);
|
||||||
|
|
||||||
TextView avatar = new TextView(context);
|
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.setLayoutParams(avatarParams);
|
||||||
avatar.setGravity(Gravity.CENTER);
|
avatar.setGravity(Gravity.CENTER);
|
||||||
avatar.setText(firstLetter(firstNonEmpty(row.avatarLabel, row.title, "设")));
|
avatar.setText(firstLetter(firstNonEmpty(row.avatarLabel, row.title, "设")));
|
||||||
avatar.setTextSize(18);
|
avatar.setTextSize(16);
|
||||||
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
avatar.setTextColor(resolveDeviceAccentColor(row.statusKey));
|
avatar.setTextColor(resolveDeviceAccentColor(row.statusKey));
|
||||||
avatar.setBackground(createRoundedBackground(resolveDeviceAvatarBackground(row.statusKey), dp(context, 18)));
|
avatar.setBackground(createRoundedBackground(resolveDeviceAvatarBackground(row.statusKey), dp(context, 18)));
|
||||||
@@ -617,7 +617,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(TextUtils.isEmpty(row.title) ? "设备" : row.title);
|
titleView.setText(TextUtils.isEmpty(row.title) ? "设备" : row.title);
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
titleView.setMaxLines(1);
|
titleView.setMaxLines(1);
|
||||||
@@ -647,7 +647,7 @@ public final class BossUi {
|
|||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
TextView arrowView = new TextView(context);
|
TextView arrowView = new TextView(context);
|
||||||
arrowView.setText("›");
|
arrowView.setText("›");
|
||||||
arrowView.setTextSize(18);
|
arrowView.setTextSize(14);
|
||||||
arrowView.setTextColor(context.getColor(R.color.boss_text_soft));
|
arrowView.setTextColor(context.getColor(R.color.boss_text_soft));
|
||||||
arrowView.setPadding(dp(context, 8), 0, 0, 0);
|
arrowView.setPadding(dp(context, 8), 0, 0, 0);
|
||||||
card.addView(arrowView);
|
card.addView(arrowView);
|
||||||
@@ -671,12 +671,12 @@ public final class BossUi {
|
|||||||
params.rightMargin = dp(context, 12);
|
params.rightMargin = dp(context, 12);
|
||||||
params.bottomMargin = dp(context, 12);
|
params.bottomMargin = dp(context, 12);
|
||||||
card.setLayoutParams(params);
|
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)));
|
card.setBackground(createRoundedBackground(Color.parseColor("#E7F5ED"), dp(context, 18)));
|
||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(title);
|
titleView.setText(title);
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
card.addView(titleView);
|
card.addView(titleView);
|
||||||
@@ -720,7 +720,7 @@ public final class BossUi {
|
|||||||
1f
|
1f
|
||||||
);
|
);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buttonParams.leftMargin = dp(context, 8);
|
buttonParams.leftMargin = dp(context, 6);
|
||||||
}
|
}
|
||||||
button.setLayoutParams(buttonParams);
|
button.setLayoutParams(buttonParams);
|
||||||
row.addView(button);
|
row.addView(button);
|
||||||
@@ -732,8 +732,8 @@ public final class BossUi {
|
|||||||
Button button = new Button(context);
|
Button button = new Button(context);
|
||||||
button.setText(label);
|
button.setText(label);
|
||||||
button.setAllCaps(false);
|
button.setAllCaps(false);
|
||||||
button.setTextSize(13);
|
button.setTextSize(12);
|
||||||
button.setPadding(dp(context, 10), dp(context, 10), dp(context, 10), dp(context, 10));
|
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.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);
|
button.setBackgroundResource(primary ? R.drawable.bg_primary_button : R.drawable.bg_secondary_button);
|
||||||
return button;
|
return button;
|
||||||
@@ -774,7 +774,7 @@ public final class BossUi {
|
|||||||
);
|
);
|
||||||
params.bottomMargin = dp(context, 1);
|
params.bottomMargin = dp(context, 1);
|
||||||
card.setLayoutParams(params);
|
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.setBackgroundColor(highlighted ? Color.parseColor("#EAF8F0") : row.pinnedConversation ? PINNED_ROW_BG : Color.WHITE);
|
||||||
card.setElevation(0f);
|
card.setElevation(0f);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
@@ -795,13 +795,13 @@ public final class BossUi {
|
|||||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||||
1f
|
1f
|
||||||
);
|
);
|
||||||
centerParams.leftMargin = dp(context, 10);
|
centerParams.leftMargin = dp(context, 9);
|
||||||
centerParams.rightMargin = dp(context, 8);
|
centerParams.rightMargin = dp(context, 7);
|
||||||
centerColumn.setLayoutParams(centerParams);
|
centerColumn.setLayoutParams(centerParams);
|
||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(TextUtils.isEmpty(row.threadTitle) ? "未命名会话" : row.threadTitle);
|
titleView.setText(TextUtils.isEmpty(row.threadTitle) ? "未命名会话" : row.threadTitle);
|
||||||
titleView.setTextSize(15);
|
titleView.setTextSize(14);
|
||||||
titleView.setIncludeFontPadding(false);
|
titleView.setIncludeFontPadding(false);
|
||||||
titleView.setGravity(Gravity.CENTER_VERTICAL);
|
titleView.setGravity(Gravity.CENTER_VERTICAL);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
@@ -810,13 +810,13 @@ public final class BossUi {
|
|||||||
titleView.setEllipsize(TextUtils.TruncateAt.END);
|
titleView.setEllipsize(TextUtils.TruncateAt.END);
|
||||||
titleView.setLayoutParams(new LinearLayout.LayoutParams(
|
titleView.setLayoutParams(new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
dp(context, 22)
|
dp(context, 20)
|
||||||
));
|
));
|
||||||
centerColumn.addView(titleView);
|
centerColumn.addView(titleView);
|
||||||
|
|
||||||
TextView previewView = new TextView(context);
|
TextView previewView = new TextView(context);
|
||||||
previewView.setText(buildConversationPreviewText(row.folderLabel, row.lastMessagePreview));
|
previewView.setText(buildConversationPreviewText(row.folderLabel, row.lastMessagePreview));
|
||||||
previewView.setTextSize(12);
|
previewView.setTextSize(11);
|
||||||
previewView.setIncludeFontPadding(false);
|
previewView.setIncludeFontPadding(false);
|
||||||
previewView.setGravity(Gravity.CENTER_VERTICAL);
|
previewView.setGravity(Gravity.CENTER_VERTICAL);
|
||||||
previewView.setTextColor(context.getColor(R.color.boss_text_soft));
|
previewView.setTextColor(context.getColor(R.color.boss_text_soft));
|
||||||
@@ -825,7 +825,7 @@ public final class BossUi {
|
|||||||
previewView.setEllipsize(TextUtils.TruncateAt.END);
|
previewView.setEllipsize(TextUtils.TruncateAt.END);
|
||||||
previewView.setLayoutParams(new LinearLayout.LayoutParams(
|
previewView.setLayoutParams(new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
dp(context, 20)
|
dp(context, 18)
|
||||||
));
|
));
|
||||||
centerColumn.addView(previewView);
|
centerColumn.addView(previewView);
|
||||||
|
|
||||||
@@ -1090,7 +1090,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText("暂无内容");
|
titleView.setText("暂无内容");
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(14);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
card.addView(titleView);
|
card.addView(titleView);
|
||||||
@@ -1153,7 +1153,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView bodyView = new TextView(context);
|
TextView bodyView = new TextView(context);
|
||||||
bodyView.setText(BossMarkdown.render(context, body, outgoing));
|
bodyView.setText(BossMarkdown.render(context, body, outgoing));
|
||||||
bodyView.setTextSize(15);
|
bodyView.setTextSize(14);
|
||||||
bodyView.setLineSpacing(0f, 1.34f);
|
bodyView.setLineSpacing(0f, 1.34f);
|
||||||
bodyView.setTextColor(context.getColor(outgoing ? R.color.boss_surface : R.color.boss_text_primary));
|
bodyView.setTextColor(context.getColor(outgoing ? R.color.boss_surface : R.color.boss_text_primary));
|
||||||
bodyView.setMaxWidth(maxBubbleWidth);
|
bodyView.setMaxWidth(maxBubbleWidth);
|
||||||
@@ -1225,7 +1225,7 @@ public final class BossUi {
|
|||||||
header.addView(titleView);
|
header.addView(titleView);
|
||||||
|
|
||||||
TextView arrowView = new TextView(context);
|
TextView arrowView = new TextView(context);
|
||||||
arrowView.setTextSize(16);
|
arrowView.setTextSize(14);
|
||||||
arrowView.setTypeface(Typeface.DEFAULT_BOLD);
|
arrowView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
arrowView.setTextColor(context.getColor(R.color.boss_text_muted));
|
arrowView.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
arrowView.setPadding(dp(context, 8), 0, 0, 0);
|
arrowView.setPadding(dp(context, 8), 0, 0, 0);
|
||||||
@@ -1332,7 +1332,7 @@ public final class BossUi {
|
|||||||
titleRow.addView(title);
|
titleRow.addView(title);
|
||||||
TextView pin = new TextView(context);
|
TextView pin = new TextView(context);
|
||||||
pin.setText("◆");
|
pin.setText("◆");
|
||||||
pin.setTextSize(18);
|
pin.setTextSize(14);
|
||||||
pin.setTextColor(Color.parseColor("#9AA09D"));
|
pin.setTextColor(Color.parseColor("#9AA09D"));
|
||||||
titleRow.addView(pin);
|
titleRow.addView(pin);
|
||||||
card.addView(titleRow);
|
card.addView(titleRow);
|
||||||
@@ -1940,7 +1940,7 @@ public final class BossUi {
|
|||||||
check.setLayoutParams(checkParams);
|
check.setLayoutParams(checkParams);
|
||||||
check.setGravity(Gravity.CENTER);
|
check.setGravity(Gravity.CENTER);
|
||||||
check.setText("✓");
|
check.setText("✓");
|
||||||
check.setTextSize(15);
|
check.setTextSize(12);
|
||||||
check.setTypeface(Typeface.DEFAULT_BOLD);
|
check.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
int color = "failed".equals(status) ? Color.parseColor("#E44B4B") :
|
int color = "failed".equals(status) ? Color.parseColor("#E44B4B") :
|
||||||
"running".equals(status) ? Color.parseColor("#1EC76F") : Color.parseColor("#9AA09D");
|
"running".equals(status) ? Color.parseColor("#1EC76F") : Color.parseColor("#9AA09D");
|
||||||
@@ -1953,7 +1953,7 @@ public final class BossUi {
|
|||||||
bodyParams.leftMargin = dp(context, 12);
|
bodyParams.leftMargin = dp(context, 12);
|
||||||
body.setLayoutParams(bodyParams);
|
body.setLayoutParams(bodyParams);
|
||||||
body.setText(text);
|
body.setText(text);
|
||||||
body.setTextSize(18);
|
body.setTextSize(14);
|
||||||
body.setLineSpacing(0f, 1.22f);
|
body.setLineSpacing(0f, 1.22f);
|
||||||
body.setTextColor(context.getColor(R.color.boss_text_primary));
|
body.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
row.addView(body);
|
row.addView(body);
|
||||||
@@ -1976,7 +1976,7 @@ public final class BossUi {
|
|||||||
private static TextView sectionTitle(Context context, String text) {
|
private static TextView sectionTitle(Context context, String text) {
|
||||||
TextView view = new TextView(context);
|
TextView view = new TextView(context);
|
||||||
view.setText(text);
|
view.setText(text);
|
||||||
view.setTextSize(17);
|
view.setTextSize(14);
|
||||||
view.setTypeface(Typeface.DEFAULT_BOLD);
|
view.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
view.setTextColor(Color.parseColor("#8B918F"));
|
view.setTextColor(Color.parseColor("#8B918F"));
|
||||||
return view;
|
return view;
|
||||||
@@ -2003,20 +2003,20 @@ public final class BossUi {
|
|||||||
TextView icon = new TextView(context);
|
TextView icon = new TextView(context);
|
||||||
icon.setText(iconText);
|
icon.setText(iconText);
|
||||||
icon.setGravity(Gravity.CENTER);
|
icon.setGravity(Gravity.CENTER);
|
||||||
icon.setTextSize(18);
|
icon.setTextSize(15);
|
||||||
icon.setTextColor(muted ? Color.parseColor("#9AA09D") : context.getColor(R.color.boss_text_primary));
|
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));
|
row.addView(icon, new LinearLayout.LayoutParams(dp(context, 34), LinearLayout.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
TextView labelView = new TextView(context);
|
TextView labelView = new TextView(context);
|
||||||
labelView.setText(label);
|
labelView.setText(label);
|
||||||
labelView.setTextSize(17);
|
labelView.setTextSize(14);
|
||||||
labelView.setTextColor(muted ? Color.parseColor("#8B918F") : context.getColor(R.color.boss_text_primary));
|
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));
|
row.addView(labelView, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f));
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(value)) {
|
if (!TextUtils.isEmpty(value)) {
|
||||||
TextView valueView = new TextView(context);
|
TextView valueView = new TextView(context);
|
||||||
valueView.setText(value);
|
valueView.setText(value);
|
||||||
valueView.setTextSize(16);
|
valueView.setTextSize(13);
|
||||||
valueView.setTextColor(valueIsChange ? Color.parseColor("#00A94F") : context.getColor(R.color.boss_text_muted));
|
valueView.setTextColor(valueIsChange ? Color.parseColor("#00A94F") : context.getColor(R.color.boss_text_muted));
|
||||||
row.addView(valueView);
|
row.addView(valueView);
|
||||||
}
|
}
|
||||||
@@ -2032,13 +2032,13 @@ public final class BossUi {
|
|||||||
TextView icon = new TextView(context);
|
TextView icon = new TextView(context);
|
||||||
icon.setText("⊞");
|
icon.setText("⊞");
|
||||||
icon.setGravity(Gravity.CENTER);
|
icon.setGravity(Gravity.CENTER);
|
||||||
icon.setTextSize(18);
|
icon.setTextSize(15);
|
||||||
icon.setTextColor(context.getColor(R.color.boss_text_primary));
|
icon.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
row.addView(icon, new LinearLayout.LayoutParams(dp(context, 34), LinearLayout.LayoutParams.WRAP_CONTENT));
|
row.addView(icon, new LinearLayout.LayoutParams(dp(context, 34), LinearLayout.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
TextView labelView = new TextView(context);
|
TextView labelView = new TextView(context);
|
||||||
labelView.setText("变更");
|
labelView.setText("变更");
|
||||||
labelView.setTextSize(17);
|
labelView.setTextSize(14);
|
||||||
labelView.setTextColor(context.getColor(R.color.boss_text_primary));
|
labelView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
row.addView(labelView, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f));
|
row.addView(labelView, new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f));
|
||||||
|
|
||||||
@@ -2046,7 +2046,7 @@ public final class BossUi {
|
|||||||
if (additions > 0) {
|
if (additions > 0) {
|
||||||
TextView additionsView = new TextView(context);
|
TextView additionsView = new TextView(context);
|
||||||
additionsView.setText("+" + String.format(Locale.US, "%,d", additions));
|
additionsView.setText("+" + String.format(Locale.US, "%,d", additions));
|
||||||
additionsView.setTextSize(16);
|
additionsView.setTextSize(13);
|
||||||
additionsView.setTextColor(Color.parseColor("#00A94F"));
|
additionsView.setTextColor(Color.parseColor("#00A94F"));
|
||||||
row.addView(additionsView);
|
row.addView(additionsView);
|
||||||
}
|
}
|
||||||
@@ -2054,7 +2054,7 @@ public final class BossUi {
|
|||||||
if (deletions > 0) {
|
if (deletions > 0) {
|
||||||
TextView deletionsView = new TextView(context);
|
TextView deletionsView = new TextView(context);
|
||||||
deletionsView.setText("-" + String.format(Locale.US, "%,d", deletions));
|
deletionsView.setText("-" + String.format(Locale.US, "%,d", deletions));
|
||||||
deletionsView.setTextSize(16);
|
deletionsView.setTextSize(13);
|
||||||
deletionsView.setTextColor(Color.parseColor("#C52828"));
|
deletionsView.setTextColor(Color.parseColor("#C52828"));
|
||||||
LinearLayout.LayoutParams deletionParams = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams deletionParams = new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||||
@@ -2148,7 +2148,7 @@ public final class BossUi {
|
|||||||
icon.setLayoutParams(iconParams);
|
icon.setLayoutParams(iconParams);
|
||||||
icon.setGravity(Gravity.CENTER);
|
icon.setGravity(Gravity.CENTER);
|
||||||
icon.setText("文");
|
icon.setText("文");
|
||||||
icon.setTextSize(15);
|
icon.setTextSize(13);
|
||||||
icon.setTypeface(Typeface.DEFAULT_BOLD);
|
icon.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
icon.setTextColor(context.getColor(R.color.boss_green));
|
icon.setTextColor(context.getColor(R.color.boss_green));
|
||||||
icon.setBackground(createRoundedBackground(Color.parseColor("#E8F6ED"), dp(context, 12)));
|
icon.setBackground(createRoundedBackground(Color.parseColor("#E8F6ED"), dp(context, 12)));
|
||||||
@@ -2298,7 +2298,7 @@ public final class BossUi {
|
|||||||
|
|
||||||
TextView titleView = new TextView(context);
|
TextView titleView = new TextView(context);
|
||||||
titleView.setText(TextUtils.isEmpty(cardTitle) ? "聊天记录" : cardTitle);
|
titleView.setText(TextUtils.isEmpty(cardTitle) ? "聊天记录" : cardTitle);
|
||||||
titleView.setTextSize(15);
|
titleView.setTextSize(13);
|
||||||
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
titleView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
titleView.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
titleView.setPadding(0, dp(context, 6), 0, 0);
|
titleView.setPadding(0, dp(context, 6), 0, 0);
|
||||||
@@ -2495,7 +2495,7 @@ public final class BossUi {
|
|||||||
private static TextView buildAttachmentPrimaryText(Context context, String text) {
|
private static TextView buildAttachmentPrimaryText(Context context, String text) {
|
||||||
TextView primary = new TextView(context);
|
TextView primary = new TextView(context);
|
||||||
primary.setText(TextUtils.isEmpty(text) ? "未命名附件" : text);
|
primary.setText(TextUtils.isEmpty(text) ? "未命名附件" : text);
|
||||||
primary.setTextSize(15);
|
primary.setTextSize(13);
|
||||||
primary.setTypeface(Typeface.DEFAULT_BOLD);
|
primary.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
primary.setTextColor(context.getColor(R.color.boss_text_primary));
|
primary.setTextColor(context.getColor(R.color.boss_text_primary));
|
||||||
primary.setMaxLines(2);
|
primary.setMaxLines(2);
|
||||||
@@ -2506,7 +2506,7 @@ public final class BossUi {
|
|||||||
private static TextView buildAttachmentSecondaryText(Context context, String text) {
|
private static TextView buildAttachmentSecondaryText(Context context, String text) {
|
||||||
TextView secondary = new TextView(context);
|
TextView secondary = new TextView(context);
|
||||||
secondary.setText(TextUtils.isEmpty(text) ? "已发送" : text);
|
secondary.setText(TextUtils.isEmpty(text) ? "已发送" : text);
|
||||||
secondary.setTextSize(13);
|
secondary.setTextSize(11);
|
||||||
secondary.setTextColor(context.getColor(R.color.boss_text_muted));
|
secondary.setTextColor(context.getColor(R.color.boss_text_muted));
|
||||||
secondary.setPadding(0, dp(context, 6), 0, 0);
|
secondary.setPadding(0, dp(context, 6), 0, 0);
|
||||||
return secondary;
|
return secondary;
|
||||||
@@ -2560,29 +2560,29 @@ public final class BossUi {
|
|||||||
firstNonEmpty(row.avatarPrimary, row.threadTitle, "会"),
|
firstNonEmpty(row.avatarPrimary, row.threadTitle, "会"),
|
||||||
AVATAR_BG_COLORS[0],
|
AVATAR_BG_COLORS[0],
|
||||||
Color.WHITE,
|
Color.WHITE,
|
||||||
44
|
40
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameLayout groupWrap = new FrameLayout(context);
|
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);
|
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"));
|
bg.setStroke(dp(context, 1), Color.parseColor("#E5ECE7"));
|
||||||
groupWrap.setBackground(bg);
|
groupWrap.setBackground(bg);
|
||||||
|
|
||||||
int visibleCount = Math.min(row.groupAvatarMembers.length, 4);
|
int visibleCount = Math.min(row.groupAvatarMembers.length, 4);
|
||||||
if (visibleCount == 0) {
|
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;
|
return groupWrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
int[][] offsets = {
|
int[][] offsets = {
|
||||||
{4, 4},
|
{4, 4},
|
||||||
{22, 4},
|
{21, 4},
|
||||||
{4, 22},
|
{4, 21},
|
||||||
{22, 22}
|
{21, 21}
|
||||||
};
|
};
|
||||||
for (int i = 0; i < visibleCount; i++) {
|
for (int i = 0; i < visibleCount; i++) {
|
||||||
WechatSurfaceMapper.GroupAvatarMember member = row.groupAvatarMembers[i];
|
WechatSurfaceMapper.GroupAvatarMember member = row.groupAvatarMembers[i];
|
||||||
@@ -2590,7 +2590,7 @@ public final class BossUi {
|
|||||||
context,
|
context,
|
||||||
firstNonEmpty(member.avatarLabel, member.title, "群"),
|
firstNonEmpty(member.avatarLabel, member.title, "群"),
|
||||||
AVATAR_BG_COLORS[(i + 1) % AVATAR_BG_COLORS.length],
|
AVATAR_BG_COLORS[(i + 1) % AVATAR_BG_COLORS.length],
|
||||||
18,
|
16,
|
||||||
offsets[i][0],
|
offsets[i][0],
|
||||||
offsets[i][1]
|
offsets[i][1]
|
||||||
));
|
));
|
||||||
@@ -2610,7 +2610,7 @@ public final class BossUi {
|
|||||||
avatarView.setLayoutParams(avatarParams);
|
avatarView.setLayoutParams(avatarParams);
|
||||||
avatarView.setGravity(Gravity.CENTER);
|
avatarView.setGravity(Gravity.CENTER);
|
||||||
avatarView.setText(firstLetter(labelSource));
|
avatarView.setText(firstLetter(labelSource));
|
||||||
avatarView.setTextSize(sizeDp >= 44 ? 18 : 10);
|
avatarView.setTextSize(sizeDp >= 40 ? 16 : 9);
|
||||||
avatarView.setTypeface(Typeface.DEFAULT_BOLD);
|
avatarView.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
avatarView.setTextColor(textColor);
|
avatarView.setTextColor(textColor);
|
||||||
avatarView.setBackground(createRoundedBackground(backgroundColor, dp(context, sizeDp / 2)));
|
avatarView.setBackground(createRoundedBackground(backgroundColor, dp(context, sizeDp / 2)));
|
||||||
|
|||||||
@@ -1239,18 +1239,18 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
int color = getColor(active ? R.color.boss_green : R.color.boss_text_muted);
|
int color = getColor(active ? R.color.boss_green : R.color.boss_text_muted);
|
||||||
button.setBackgroundColor(Color.TRANSPARENT);
|
button.setBackgroundColor(Color.TRANSPARENT);
|
||||||
button.setTextColor(color);
|
button.setTextColor(color);
|
||||||
button.setTextSize(11);
|
button.setTextSize(10);
|
||||||
button.setAllCaps(false);
|
button.setAllCaps(false);
|
||||||
button.setGravity(android.view.Gravity.CENTER);
|
button.setGravity(android.view.Gravity.CENTER);
|
||||||
Drawable topIcon = getDrawable(iconRes);
|
Drawable topIcon = getDrawable(iconRes);
|
||||||
if (topIcon != null) {
|
if (topIcon != null) {
|
||||||
int iconSize = BossUi.dp(this, 20);
|
int iconSize = BossUi.dp(this, 18);
|
||||||
topIcon.setBounds(0, 0, iconSize, iconSize);
|
topIcon.setBounds(0, 0, iconSize, iconSize);
|
||||||
}
|
}
|
||||||
button.setCompoundDrawables(null, topIcon, null, null);
|
button.setCompoundDrawables(null, topIcon, null, null);
|
||||||
button.setCompoundDrawablePadding(BossUi.dp(this, 2));
|
button.setCompoundDrawablePadding(BossUi.dp(this, 2));
|
||||||
button.setCompoundDrawableTintList(ColorStateList.valueOf(color));
|
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) {
|
private void configureTopAction(WechatSurfaceMapper.RootTopAction action) {
|
||||||
@@ -1580,14 +1580,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
TextView selectedView = new TextView(this);
|
TextView selectedView = new TextView(this);
|
||||||
selectedView.setText("已选 " + count + " 个线程");
|
selectedView.setText("已选 " + count + " 个线程");
|
||||||
selectedView.setTextSize(13);
|
selectedView.setTextSize(12);
|
||||||
selectedView.setTextColor(getColor(R.color.boss_text_primary));
|
selectedView.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
summaryWrap.addView(selectedView);
|
summaryWrap.addView(selectedView);
|
||||||
}
|
}
|
||||||
if (count < 2) {
|
if (count < 2) {
|
||||||
TextView hintView = new TextView(this);
|
TextView hintView = new TextView(this);
|
||||||
hintView.setText("至少选择 2 个线程");
|
hintView.setText("至少选择 2 个线程");
|
||||||
hintView.setTextSize(12);
|
hintView.setTextSize(11);
|
||||||
hintView.setTextColor(getColor(R.color.boss_text_muted));
|
hintView.setTextColor(getColor(R.color.boss_text_muted));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
hintView.setPadding(0, BossUi.dp(this, 4), 0, 0);
|
hintView.setPadding(0, BossUi.dp(this, 4), 0, 0);
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
private View buildDialogGuardInterventionView(JSONObject payload) {
|
private View buildDialogGuardInterventionView(JSONObject payload) {
|
||||||
LinearLayout card = new LinearLayout(this);
|
LinearLayout card = new LinearLayout(this);
|
||||||
card.setOrientation(LinearLayout.VERTICAL);
|
card.setOrientation(LinearLayout.VERTICAL);
|
||||||
int padding = BossUi.dp(this, 18);
|
int padding = BossUi.dp(this, 14);
|
||||||
card.setPadding(padding, padding, padding, padding);
|
card.setPadding(padding, padding, padding, padding);
|
||||||
|
|
||||||
TextView kicker = new TextView(this);
|
TextView kicker = new TextView(this);
|
||||||
@@ -730,7 +730,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView title = new TextView(this);
|
TextView title = new TextView(this);
|
||||||
title.setText(dialogGuardTitle(payload));
|
title.setText(dialogGuardTitle(payload));
|
||||||
title.setTextSize(18);
|
title.setTextSize(14);
|
||||||
title.setTypeface(Typeface.DEFAULT_BOLD);
|
title.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
title.setTextColor(getColor(R.color.boss_text_primary));
|
title.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams titleParams = new LinearLayout.LayoutParams(
|
||||||
@@ -742,7 +742,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView summary = new TextView(this);
|
TextView summary = new TextView(this);
|
||||||
summary.setText(payload.optString("summary", "绑定电脑上有一个弹窗需要你确认。"));
|
summary.setText(payload.optString("summary", "绑定电脑上有一个弹窗需要你确认。"));
|
||||||
summary.setTextSize(15);
|
summary.setTextSize(13);
|
||||||
summary.setTextColor(getColor(R.color.boss_text_primary));
|
summary.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
summary.setLineSpacing(BossUi.dp(this, 2), 1.0f);
|
summary.setLineSpacing(BossUi.dp(this, 2), 1.0f);
|
||||||
LinearLayout.LayoutParams summaryParams = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams summaryParams = new LinearLayout.LayoutParams(
|
||||||
@@ -754,7 +754,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView meta = new TextView(this);
|
TextView meta = new TextView(this);
|
||||||
meta.setText(dialogGuardMeta(payload));
|
meta.setText(dialogGuardMeta(payload));
|
||||||
meta.setTextSize(13);
|
meta.setTextSize(11);
|
||||||
meta.setTextColor(getColor(R.color.boss_text_muted));
|
meta.setTextColor(getColor(R.color.boss_text_muted));
|
||||||
LinearLayout.LayoutParams metaParams = new LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams metaParams = new LinearLayout.LayoutParams(
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||||
@@ -777,7 +777,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
Button button = new Button(this);
|
Button button = new Button(this);
|
||||||
button.setAllCaps(false);
|
button.setAllCaps(false);
|
||||||
button.setText(dialogGuardDecisionLabel(decision));
|
button.setText(dialogGuardDecisionLabel(decision));
|
||||||
button.setTextSize(15);
|
button.setTextSize(13);
|
||||||
button.setTextColor(getColor("deny".equals(decision) || "cancel_task".equals(decision)
|
button.setTextColor(getColor("deny".equals(decision) || "cancel_task".equals(decision)
|
||||||
? android.R.color.holo_red_dark
|
? android.R.color.holo_red_dark
|
||||||
: R.color.boss_text_primary));
|
: R.color.boss_text_primary));
|
||||||
@@ -1436,7 +1436,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
avatar.setLayoutParams(avatarParams);
|
avatar.setLayoutParams(avatarParams);
|
||||||
avatar.setGravity(Gravity.CENTER);
|
avatar.setGravity(Gravity.CENTER);
|
||||||
avatar.setText(candidate.label.startsWith("主") ? "主" : "审");
|
avatar.setText(candidate.label.startsWith("主") ? "主" : "审");
|
||||||
avatar.setTextSize(15);
|
avatar.setTextSize(13);
|
||||||
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
avatar.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
avatar.setTextColor(candidate.label.startsWith("主") ? getColor(R.color.boss_green) : getColor(R.color.boss_text_primary));
|
avatar.setTextColor(candidate.label.startsWith("主") ? getColor(R.color.boss_green) : getColor(R.color.boss_text_primary));
|
||||||
GradientDrawable avatarBg = new GradientDrawable();
|
GradientDrawable avatarBg = new GradientDrawable();
|
||||||
@@ -1451,7 +1451,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView title = new TextView(this);
|
TextView title = new TextView(this);
|
||||||
title.setText(candidate.label);
|
title.setText(candidate.label);
|
||||||
title.setTextSize(16);
|
title.setTextSize(14);
|
||||||
title.setTypeface(Typeface.DEFAULT_BOLD);
|
title.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
title.setTextColor(getColor(R.color.boss_text_primary));
|
title.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
textWrap.addView(title);
|
textWrap.addView(title);
|
||||||
@@ -1564,7 +1564,7 @@ public class ProjectDetailActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView title = new TextView(this);
|
TextView title = new TextView(this);
|
||||||
title.setText("发送附件");
|
title.setText("发送附件");
|
||||||
title.setTextSize(16);
|
title.setTextSize(14);
|
||||||
title.setTypeface(android.graphics.Typeface.DEFAULT_BOLD);
|
title.setTypeface(android.graphics.Typeface.DEFAULT_BOLD);
|
||||||
title.setTextColor(getColor(R.color.boss_text_primary));
|
title.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
title.setPadding(0, 0, 0, BossUi.dp(this, 12));
|
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.setGravity(Gravity.CENTER_VERTICAL | Gravity.START);
|
||||||
button.setPadding(BossUi.dp(this, 16), 0, BossUi.dp(this, 16), 0);
|
button.setPadding(BossUi.dp(this, 16), 0, BossUi.dp(this, 16), 0);
|
||||||
button.setText(label);
|
button.setText(label);
|
||||||
button.setTextSize(15);
|
button.setTextSize(13);
|
||||||
button.setTextColor(getColor(R.color.boss_text_primary));
|
button.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
button.setOnClickListener(v -> {
|
button.setOnClickListener(v -> {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ public class ProjectGoalsActivity extends BossScreenActivity {
|
|||||||
indicator.setLayoutParams(indicatorParams);
|
indicator.setLayoutParams(indicatorParams);
|
||||||
indicator.setGravity(Gravity.CENTER);
|
indicator.setGravity(Gravity.CENTER);
|
||||||
indicator.setText(completed ? "✓" : "○");
|
indicator.setText(completed ? "✓" : "○");
|
||||||
indicator.setTextSize(18);
|
indicator.setTextSize(14);
|
||||||
indicator.setTextColor(getColor(completed ? R.color.boss_green : R.color.boss_text_muted));
|
indicator.setTextColor(getColor(completed ? R.color.boss_green : R.color.boss_text_muted));
|
||||||
row.addView(indicator);
|
row.addView(indicator);
|
||||||
|
|
||||||
@@ -257,14 +257,14 @@ public class ProjectGoalsActivity extends BossScreenActivity {
|
|||||||
|
|
||||||
TextView title = new TextView(this);
|
TextView title = new TextView(this);
|
||||||
title.setText(goal.optString("text", "未命名目标"));
|
title.setText(goal.optString("text", "未命名目标"));
|
||||||
title.setTextSize(16);
|
title.setTextSize(14);
|
||||||
title.setTextColor(getColor(R.color.boss_text_primary));
|
title.setTextColor(getColor(R.color.boss_text_primary));
|
||||||
title.setLineSpacing(0f, 1.2f);
|
title.setLineSpacing(0f, 1.2f);
|
||||||
texts.addView(title);
|
texts.addView(title);
|
||||||
|
|
||||||
TextView note = new TextView(this);
|
TextView note = new TextView(this);
|
||||||
note.setText(goal.optString("note", "暂无备注"));
|
note.setText(goal.optString("note", "暂无备注"));
|
||||||
note.setTextSize(13);
|
note.setTextSize(12);
|
||||||
note.setTextColor(getColor(R.color.boss_text_muted));
|
note.setTextColor(getColor(R.color.boss_text_muted));
|
||||||
note.setPadding(0, BossUi.dp(this, 8), 0, 0);
|
note.setPadding(0, BossUi.dp(this, 8), 0, 0);
|
||||||
texts.addView(note);
|
texts.addView(note);
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="会话信息"
|
android:text="会话信息"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -51,29 +51,29 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:text="单线程会话信息页"
|
android:text="单线程会话信息页"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="标题"
|
android:text="标题"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -51,29 +51,29 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:text="副标题"
|
android:text="副标题"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="发起群聊"
|
android:text="发起群聊"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -51,29 +51,29 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:text="从当前会话选择其他线程"
|
android:text="从当前会话选择其他线程"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="群资料"
|
android:text="群资料"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -51,29 +51,29 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:text="群聊资料页"
|
android:text="群聊资料页"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -22,23 +22,23 @@
|
|||||||
android:paddingBottom="40dp">
|
android:paddingBottom="40dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="72dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="72dp"
|
android:layout_height="60dp"
|
||||||
android:background="@drawable/bg_secondary_button"
|
android:background="@drawable/bg_secondary_button"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="B"
|
android:text="B"
|
||||||
android:textColor="@color/boss_green"
|
android:textColor="@color/boss_green"
|
||||||
android:textSize="28sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/login_title"
|
android:id="@+id/login_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="22dp"
|
android:layout_marginTop="18dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="30sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
android:lineSpacingExtra="4dp"
|
android:lineSpacingExtra="4dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="14sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/login_account_input"
|
android:id="@+id/login_account_input"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginTop="28dp"
|
android:layout_marginTop="28dp"
|
||||||
android:background="@drawable/bg_secondary_button"
|
android:background="@drawable/bg_secondary_button"
|
||||||
android:hint="账号"
|
android:hint="账号"
|
||||||
@@ -66,12 +66,12 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textColorHint="@color/boss_text_muted"
|
android:textColorHint="@color/boss_text_muted"
|
||||||
android:textSize="16sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/login_password_input"
|
android:id="@+id/login_password_input"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:background="@drawable/bg_secondary_button"
|
android:background="@drawable/bg_secondary_button"
|
||||||
android:hint="密码"
|
android:hint="密码"
|
||||||
@@ -82,12 +82,12 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textColorHint="@color/boss_text_muted"
|
android:textColorHint="@color/boss_text_muted"
|
||||||
android:textSize="16sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/login_confirm_password_input"
|
android:id="@+id/login_confirm_password_input"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:background="@drawable/bg_secondary_button"
|
android:background="@drawable/bg_secondary_button"
|
||||||
android:hint="确认密码"
|
android:hint="确认密码"
|
||||||
@@ -98,13 +98,13 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textColorHint="@color/boss_text_muted"
|
android:textColorHint="@color/boss_text_muted"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/login_code_row"
|
android:id="@+id/login_code_row"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textColorHint="@color/boss_text_muted"
|
android:textColorHint="@color/boss_text_muted"
|
||||||
android:textSize="16sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/login_send_code_button"
|
android:id="@+id/login_send_code_button"
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
android:text="获取验证码"
|
android:text="获取验证码"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="14sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
@@ -150,12 +150,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="22dp"
|
android:layout_marginTop="22dp"
|
||||||
android:background="@drawable/bg_primary_button"
|
android:background="@drawable/bg_primary_button"
|
||||||
android:paddingTop="14dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="12dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_surface"
|
android:textColor="@color/boss_surface"
|
||||||
android:textSize="18sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
android:text="账号登录"
|
android:text="账号登录"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_green"
|
android:textColor="@color/boss_green"
|
||||||
android:textSize="14sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/register_mode_button"
|
android:id="@+id/register_mode_button"
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
android:text="注册账号"
|
android:text="注册账号"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="14sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/forgot_mode_button"
|
android:id="@+id/forgot_mode_button"
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
android:text="忘记密码"
|
android:text="忘记密码"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="14sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
@@ -214,19 +214,19 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/back_button"
|
android:id="@+id/back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="会话"
|
android:text="会话"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -256,14 +256,14 @@
|
|||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp"
|
android:textSize="11sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/top_search_input"
|
android:id="@+id/top_search_input"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/bg_secondary_button"
|
android:background="@drawable/bg_secondary_button"
|
||||||
android:hint="搜索项目或线程"
|
android:hint="搜索项目或线程"
|
||||||
@@ -275,27 +275,27 @@
|
|||||||
android:paddingBottom="7dp"
|
android:paddingBottom="7dp"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textColorHint="@color/boss_text_muted"
|
android:textColorHint="@color/boss_text_muted"
|
||||||
android:textSize="15sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/search_button"
|
android:id="@+id/search_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginRight="8dp"
|
android:layout_marginRight="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="搜索"
|
android:contentDescription="搜索"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_search"
|
android:src="@drawable/ic_boss_search"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/refresh_button"
|
android:id="@+id/refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="快捷操作"
|
android:contentDescription="快捷操作"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_add"
|
android:src="@drawable/ic_boss_add"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="58dp"
|
android:layout_height="54dp"
|
||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -332,7 +332,7 @@
|
|||||||
android:text="会话"
|
android:text="会话"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_green"
|
android:textColor="@color/boss_green"
|
||||||
android:textSize="11sp"
|
android:textSize="10sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
android:text="设备"
|
android:text="设备"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="11sp"
|
android:textSize="10sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
android:text="我的"
|
android:text="我的"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="11sp"
|
android:textSize="10sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -409,7 +409,7 @@
|
|||||||
android:text="添加设备"
|
android:text="添加设备"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_quick_actions_menu_text"
|
android:textColor="@color/boss_quick_actions_menu_text"
|
||||||
android:textSize="15sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/quick_action_scan"
|
android:id="@+id/quick_action_scan"
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
android:text="扫一扫"
|
android:text="扫一扫"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_quick_actions_menu_text"
|
android:textColor="@color/boss_quick_actions_menu_text"
|
||||||
android:textSize="15sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/quick_action_group_chat"
|
android:id="@+id/quick_action_group_chat"
|
||||||
@@ -437,7 +437,7 @@
|
|||||||
android:text="发起群聊"
|
android:text="发起群聊"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/boss_quick_actions_menu_text"
|
android:textColor="@color/boss_quick_actions_menu_text"
|
||||||
android:textSize="15sp" />
|
android:textSize="13sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="项目详情"
|
android:text="项目详情"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="19sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -53,29 +53,29 @@
|
|||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:text="设备"
|
android:text="设备"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
android:background="@color/boss_surface"
|
android:background="@color/boss_surface"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="18dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingRight="18dp"
|
android:paddingRight="16dp"
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="7dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_back_button"
|
android:id="@+id/screen_back_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="返回"
|
android:contentDescription="返回"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_back"
|
android:src="@drawable/ic_boss_back"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="标题"
|
android:text="标题"
|
||||||
android:textColor="@color/boss_text_primary"
|
android:textColor="@color/boss_text_primary"
|
||||||
android:textSize="20sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -55,29 +55,29 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="副标题"
|
android:text="副标题"
|
||||||
android:textColor="@color/boss_text_muted"
|
android:textColor="@color/boss_text_muted"
|
||||||
android:textSize="12sp" />
|
android:textSize="11sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_header_action"
|
android:id="@+id/screen_header_action"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="更多"
|
android:contentDescription="更多"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_more"
|
android:src="@drawable/ic_boss_more"
|
||||||
android:tint="@color/boss_text_primary"
|
android:tint="@color/boss_text_primary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/screen_refresh_button"
|
android:id="@+id/screen_refresh_button"
|
||||||
android:layout_width="36dp"
|
android:layout_width="34dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:background="@drawable/bg_top_icon_button"
|
android:background="@drawable/bg_top_icon_button"
|
||||||
android:contentDescription="刷新"
|
android:contentDescription="刷新"
|
||||||
android:padding="7dp"
|
android:padding="6dp"
|
||||||
android:src="@drawable/ic_boss_refresh"
|
android:src="@drawable/ic_boss_refresh"
|
||||||
android:tint="@color/boss_text_primary" />
|
android:tint="@color/boss_text_primary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -63,15 +63,16 @@ public class BossUiConversationRowTest {
|
|||||||
previewView.getMeasuredWidth(),
|
previewView.getMeasuredWidth(),
|
||||||
previewView.getMeasuredHeight()
|
previewView.getMeasuredHeight()
|
||||||
);
|
);
|
||||||
assertEquals("列表项应恢复成更紧凑的信息密度: " + metrics, BossUi.dp(context, 14), rowView.getPaddingLeft());
|
assertEquals("列表项应对标微信当前紧凑密度: " + metrics, BossUi.dp(context, 12), rowView.getPaddingLeft());
|
||||||
assertEquals("列表项应恢复成更紧凑的信息密度: " + metrics, BossUi.dp(context, 8), rowView.getPaddingTop());
|
assertEquals("列表项应对标微信当前紧凑密度: " + metrics, BossUi.dp(context, 6), rowView.getPaddingTop());
|
||||||
assertEquals("列表项应恢复成更紧凑的信息密度: " + metrics, BossUi.dp(context, 14), rowView.getPaddingRight());
|
assertEquals("列表项应对标微信当前紧凑密度: " + metrics, BossUi.dp(context, 12), rowView.getPaddingRight());
|
||||||
assertEquals("列表项应恢复成更紧凑的信息密度: " + metrics, BossUi.dp(context, 8), rowView.getPaddingBottom());
|
assertEquals("列表项应对标微信当前紧凑密度: " + metrics, BossUi.dp(context, 6), rowView.getPaddingBottom());
|
||||||
assertEquals("列表项不应保持卡片式浮层感: " + metrics, 0f, rowView.getElevation(), 0.01f);
|
assertEquals("列表项不应保持卡片式浮层感: " + metrics, 0f, rowView.getElevation(), 0.01f);
|
||||||
assertTrue("单条会话行不应再撑到接近 90dp: " + metrics, rowView.getMeasuredHeight() <= BossUi.dp(context, 78));
|
assertTrue("单条会话行应维持微信式有效信息面积: " + metrics, rowView.getMeasuredHeight() <= BossUi.dp(context, 68));
|
||||||
assertEquals("会话头像应恢复到更克制的尺寸: " + metrics, BossUi.dp(context, 44), rowView.getChildAt(0).getLayoutParams().width);
|
assertEquals("会话头像应回到微信列表的小尺寸: " + metrics, BossUi.dp(context, 40), rowView.getChildAt(0).getLayoutParams().width);
|
||||||
assertEquals("会话头像应恢复到更克制的尺寸: " + metrics, BossUi.dp(context, 44), rowView.getChildAt(0).getLayoutParams().height);
|
assertEquals("会话头像应回到微信列表的小尺寸: " + metrics, BossUi.dp(context, 40), rowView.getChildAt(0).getLayoutParams().height);
|
||||||
assertEquals("标题字号应回到中等密度", 15f, titleView.getTextSize() / context.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
assertEquals("标题字号应对标微信列表主标题", 14f, titleView.getTextSize() / context.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
||||||
|
assertEquals("预览字号应对标微信列表辅助文字", 11f, previewView.getTextSize() / context.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
||||||
assertTrue("中间文字列不应被挤成 0 宽: " + metrics, centerColumn.getMeasuredWidth() > 0);
|
assertTrue("中间文字列不应被挤成 0 宽: " + metrics, centerColumn.getMeasuredWidth() > 0);
|
||||||
assertTrue("标题需要保留可见宽度: " + metrics, titleView.getMeasuredWidth() > 0);
|
assertTrue("标题需要保留可见宽度: " + metrics, titleView.getMeasuredWidth() > 0);
|
||||||
assertTrue("预览需要保留可见宽度: " + metrics, previewView.getMeasuredWidth() > 0);
|
assertTrue("预览需要保留可见宽度: " + metrics, previewView.getMeasuredWidth() > 0);
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ public class BossUiRootSurfaceTest {
|
|||||||
assertEquals("资料头不应保留浮层卡片感", 0f, header.getElevation(), 0.01f);
|
assertEquals("资料头不应保留浮层卡片感", 0f, header.getElevation(), 0.01f);
|
||||||
assertTrue("资料头应保持横向布局", header instanceof LinearLayout);
|
assertTrue("资料头应保持横向布局", header instanceof LinearLayout);
|
||||||
View avatar = ((LinearLayout) header).getChildAt(0);
|
View avatar = ((LinearLayout) header).getChildAt(0);
|
||||||
assertEquals("我的页头像应恢复到中等尺寸", BossUi.dp(activity, 56), avatar.getLayoutParams().width);
|
assertEquals("我的页头像应对标微信资料入口尺寸", BossUi.dp(activity, 52), avatar.getLayoutParams().width);
|
||||||
assertEquals("我的页头像应恢复到中等尺寸", BossUi.dp(activity, 56), avatar.getLayoutParams().height);
|
assertEquals("我的页头像应对标微信资料入口尺寸", BossUi.dp(activity, 52), avatar.getLayoutParams().height);
|
||||||
assertTrue(viewTreeContainsText(header, "Kris"));
|
assertTrue(viewTreeContainsText(header, "Kris"));
|
||||||
assertTrue(viewTreeContainsText(header, "krisolo"));
|
assertTrue(viewTreeContainsText(header, "krisolo"));
|
||||||
assertTrue(viewTreeContainsText(header, "最高管理员"));
|
assertTrue(viewTreeContainsText(header, "最高管理员"));
|
||||||
@@ -105,12 +105,12 @@ public class BossUiRootSurfaceTest {
|
|||||||
assertEquals("会话", conversations.getText().toString());
|
assertEquals("会话", conversations.getText().toString());
|
||||||
assertEquals("设备", devices.getText().toString());
|
assertEquals("设备", devices.getText().toString());
|
||||||
assertEquals("我的", me.getText().toString());
|
assertEquals("我的", me.getText().toString());
|
||||||
assertEquals("顶部标题应恢复到更克制的字号", 20f, ((TextView) activity.findViewById(R.id.top_title)).getTextSize() / activity.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
assertEquals("顶部标题应对标微信页面标题", 18f, ((TextView) activity.findViewById(R.id.top_title)).getTextSize() / activity.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
||||||
assertEquals("底栏高度应恢复到更紧凑的有效面积", BossUi.dp(activity, 58), ((View) conversations.getParent()).getLayoutParams().height);
|
assertEquals("底栏高度应对标微信底栏有效面积", BossUi.dp(activity, 54), ((View) conversations.getParent()).getLayoutParams().height);
|
||||||
assertNotNull("会话 tab 应显示顶部图标", conversations.getCompoundDrawables()[1]);
|
assertNotNull("会话 tab 应显示顶部图标", conversations.getCompoundDrawables()[1]);
|
||||||
assertNotNull("设备 tab 应显示顶部图标", devices.getCompoundDrawables()[1]);
|
assertNotNull("设备 tab 应显示顶部图标", devices.getCompoundDrawables()[1]);
|
||||||
assertNotNull("我的 tab 应显示顶部图标", me.getCompoundDrawables()[1]);
|
assertNotNull("我的 tab 应显示顶部图标", me.getCompoundDrawables()[1]);
|
||||||
assertEquals("底栏文字应保持小字号", 11f, conversations.getTextSize() / activity.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
assertEquals("底栏文字应对标微信底栏标签", 10f, conversations.getTextSize() / activity.getResources().getDisplayMetrics().scaledDensity, 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean viewTreeContainsText(View root, String expectedText) {
|
private static boolean viewTreeContainsText(View root, String expectedText) {
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ public class BossUiTopActionStyleTest {
|
|||||||
|
|
||||||
BossUi.applyTopIconButtonStyle(context, button);
|
BossUi.applyTopIconButtonStyle(context, button);
|
||||||
|
|
||||||
assertEquals(BossUi.dp(context, 36), button.getMinimumWidth());
|
assertEquals(BossUi.dp(context, 34), button.getMinimumWidth());
|
||||||
assertEquals(BossUi.dp(context, 36), button.getMinimumHeight());
|
assertEquals(BossUi.dp(context, 34), button.getMinimumHeight());
|
||||||
assertEquals(BossUi.dp(context, 7), button.getPaddingLeft());
|
assertEquals(BossUi.dp(context, 6), button.getPaddingLeft());
|
||||||
assertEquals(BossUi.dp(context, 7), button.getPaddingTop());
|
assertEquals(BossUi.dp(context, 6), button.getPaddingTop());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ public class ConversationInfoActivityTest {
|
|||||||
SwitchCompat takeoverSwitch = findFirstSwitch(takeoverRow);
|
SwitchCompat takeoverSwitch = findFirstSwitch(takeoverRow);
|
||||||
|
|
||||||
assertEquals(LinearLayout.HORIZONTAL, takeoverRow.getOrientation());
|
assertEquals(LinearLayout.HORIZONTAL, takeoverRow.getOrientation());
|
||||||
assertEquals(BossUi.dp(activity, 14), takeoverRow.getPaddingLeft());
|
assertEquals(BossUi.dp(activity, 12), takeoverRow.getPaddingLeft());
|
||||||
assertEquals(BossUi.dp(activity, 14), takeoverRow.getPaddingRight());
|
assertEquals(BossUi.dp(activity, 12), takeoverRow.getPaddingRight());
|
||||||
assertNotNull(takeoverSwitch);
|
assertNotNull(takeoverSwitch);
|
||||||
assertEquals("", String.valueOf(takeoverSwitch.getText()));
|
assertEquals("", String.valueOf(takeoverSwitch.getText()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user