diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e466ba369..aaa312dff 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -834,10 +834,6 @@
-
-
diff --git a/app/src/main/java/com/nnbc123/app/avroom/fragment/HomePartyFragment.kt b/app/src/main/java/com/nnbc123/app/avroom/fragment/HomePartyFragment.kt
index 253cc9e0c..9318e0006 100644
--- a/app/src/main/java/com/nnbc123/app/avroom/fragment/HomePartyFragment.kt
+++ b/app/src/main/java/com/nnbc123/app/avroom/fragment/HomePartyFragment.kt
@@ -503,7 +503,14 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
private fun setupFollowRoom() {
binding.tvFollowRoom.visibility =
- if (AvRoomDataManager.get().isRoomFans || AvRoomDataManager.get().isRoomOwner) View.GONE else View.VISIBLE
+ if (AvRoomDataManager.get().isRoomOwner) View.GONE else View.VISIBLE
+ if (AvRoomDataManager.get().isRoomFans) {
+ binding.tvFollowRoom.text = "已收藏"
+ binding.tvFollowRoom.setBackgroundResource(R.drawable.shape_bdbfd0_corner)
+ } else {
+ binding.tvFollowRoom.text = "收藏"
+ binding.tvFollowRoom.setBackgroundResource(R.drawable.shape_67d7d7_corner)
+ }
}
@Subscribe(threadMode = ThreadMode.MAIN)
@@ -614,13 +621,13 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
}
private fun updateOnlineNumberView(onlineNumber: Int) {
- var onlineNumber = onlineNumber
+ var onlineNumberVar = onlineNumber
if (!SuperAdminUtil.isSuperAdmin()) {
if (onlineNumber < 1) {
- onlineNumber = 1
+ onlineNumberVar = 1
}
}
- binding.roomNums.text = "在线$onlineNumber"
+ binding.roomNums.text = "$onlineNumberVar"
}
companion object {
diff --git a/app/src/main/java/com/nnbc123/app/avroom/widget/MessageView.java b/app/src/main/java/com/nnbc123/app/avroom/widget/MessageView.java
index ea7bf353e..8e0494bcf 100644
--- a/app/src/main/java/com/nnbc123/app/avroom/widget/MessageView.java
+++ b/app/src/main/java/com/nnbc123/app/avroom/widget/MessageView.java
@@ -199,8 +199,6 @@ public class MessageView extends FrameLayout {
private static final String TAG = "MessageView";
private final static int MAX_MESSAGE_SIZE = 2000;//公屏最多展示条数
private final static int BLOCK_MAX_MESSAGE_SIZE = MAX_MESSAGE_SIZE * 3 / 2;//在查看消息停住的时候 最多消息条数.
- private static final int LOAD_MESSAGE_COUNT = 10;
- private final int textColor = 0x80ffffff;
private final List atMessages = new ArrayList<>();
private final List chatRoomMessages = new LinkedList<>();
private RecyclerView messageListView;
@@ -213,8 +211,7 @@ public class MessageView extends FrameLayout {
private int paddingHeight;
private int whiteColor;
private int greyColor;
- private int roomTipNickColor;
- private int roomTipColor;
+ private int appColor;
private int badgeWidth;
private int badgeHeight;
private int sysIconHeight;
@@ -274,10 +271,9 @@ public class MessageView extends FrameLayout {
@SuppressLint("ClickableViewAccessibility")
private void init(Context context) {
- whiteColor = ContextCompat.getColor(context, R.color.white_transparent_70);
+ whiteColor = ContextCompat.getColor(context, R.color.white);
greyColor = ContextCompat.getColor(context, R.color.white_transparent_50);
- roomTipNickColor = ContextCompat.getColor(context, R.color.color_ffbc51);
- roomTipColor = ContextCompat.getColor(context, R.color.color_ffbc51);
+ appColor = ContextCompat.getColor(context, R.color.app_color);
paddingWidth = Utils.dip2px(context, 10);
paddingHeight = Utils.dip2px(context, 8);
badgeWidth = Utils.dip2px(context, 15);
@@ -843,7 +839,7 @@ public class MessageView extends FrameLayout {
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_SUPER_ADMIN) {
//超管
CharSequence charSequence = SaAttachmentToMsgUtil.formatSuperAdminInfo(attachment,
- tvContent, greyColor, roomTipColor);
+ tvContent, greyColor, appColor);
if (charSequence != null) {
tvContent.setText(charSequence);
}
@@ -1013,10 +1009,10 @@ public class MessageView extends FrameLayout {
if (giftCompoundAttachment.getSecond() == CUSTOM_MSG_SUB_GIFT_COMPOUND) {
GiftCompoundMsgBean msgInfo = giftCompoundAttachment.getMsgBean();
SpannableBuilder text = new SpannableBuilder(tvContent);
- text.append("恭喜", new ForegroundColorSpan(whiteColor))
+ text.append("恭喜", new ForegroundColorSpan(greyColor))
.append(
msgInfo.getNick(),
- new ForegroundColorSpan(roomTipNickColor),
+ new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1027,7 +1023,7 @@ public class MessageView extends FrameLayout {
}
)
.append(msgInfo.getMsg(), new ForegroundColorSpan(whiteColor))
- .append(msgInfo.getGiftName(), new ForegroundColorSpan(roomTipNickColor));
+ .append(msgInfo.getGiftName(), new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1045,8 +1041,8 @@ public class MessageView extends FrameLayout {
if (fansTeamMsgAttachment.getSecond() == CUSTOM_MSG_SUB_FANS_TEAM_JOIN) {
FansTeamMsgInfo msgInfo = fansTeamMsgAttachment.getFansTeamMsgInfo();
SpannableBuilder text = new SpannableBuilder(tvContent);
- text.append("欢迎", new ForegroundColorSpan(whiteColor))
- .append(msgInfo.getNickname(), new ForegroundColorSpan(roomTipNickColor),
+ text.append("欢迎", new ForegroundColorSpan(greyColor))
+ .append(msgInfo.getNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1076,8 +1072,8 @@ public class MessageView extends FrameLayout {
int second = datingAttachment.getSecond();
switch (second) {
case CustomAttachment.CUSTOM_MSG_VIP_ROOM_OPEN:
- text.append("贵族降临!恭喜", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getNick() + "(" + notifyInfo.getErbanNo() + ")", new ForegroundColorSpan(roomTipNickColor),
+ text.append("贵族降临!恭喜", new ForegroundColorSpan(greyColor))
+ .append(notifyInfo.getNick() + "(" + notifyInfo.getErbanNo() + ")", new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1088,13 +1084,13 @@ public class MessageView extends FrameLayout {
}
})
.append("开通贵族系统,获得", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getCurrVipName(), new ForegroundColorSpan(roomTipColor))
+ .append(notifyInfo.getCurrVipName(), new ForegroundColorSpan(appColor))
.append("贵族身份!", new ForegroundColorSpan(whiteColor));
break;
case CustomAttachment.CUSTOM_MSG_VIP_ROOM_UPGRADE:
case CustomAttachment.CUSTOM_MSG_VIP_ROOM_ALL_UPGRADE:
- text.append("全场欢呼!!恭喜", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getNick() + "(" + notifyInfo.getErbanNo() + ")", new ForegroundColorSpan(roomTipNickColor),
+ text.append("全场欢呼!!恭喜", new ForegroundColorSpan(greyColor))
+ .append(notifyInfo.getNick() + "(" + notifyInfo.getErbanNo() + ")", new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1104,7 +1100,7 @@ public class MessageView extends FrameLayout {
}
})
.append("的贵族身份成功升级为", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getCurrVipName(), new ForegroundColorSpan(roomTipColor));
+ .append(notifyInfo.getCurrVipName(), new ForegroundColorSpan(appColor));
break;
}
tvContent.setText(text.build());
@@ -1122,14 +1118,14 @@ public class MessageView extends FrameLayout {
LuckyBagNoticeInfo noticeInfo = attachment.getLuckyBagNoticeInfo();
String nickName = RegexUtil.getPrintableString(noticeInfo.getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("恭喜 ", new ForegroundColorSpan(textColor))
- .append(nickName, new ForegroundColorSpan(roomTipNickColor))
- .append("在", new ForegroundColorSpan(textColor))
- .append(noticeInfo.getRoomTitle() + "", new ForegroundColorSpan(roomTipNickColor))
- .append("房间通过", new ForegroundColorSpan(textColor))
- .append(noticeInfo.getLuckyBagName(), new ForegroundColorSpan(roomTipNickColor))
- .append(",开出", new ForegroundColorSpan(textColor))
- .append(noticeInfo.getGiftName() + "", new ForegroundColorSpan(roomTipNickColor));
+ .append("恭喜 ", new ForegroundColorSpan(greyColor))
+ .append(nickName, new ForegroundColorSpan(appColor))
+ .append("在", new ForegroundColorSpan(whiteColor))
+ .append(noticeInfo.getRoomTitle() + "", new ForegroundColorSpan(appColor))
+ .append("房间通过", new ForegroundColorSpan(whiteColor))
+ .append(noticeInfo.getLuckyBagName(), new ForegroundColorSpan(appColor))
+ .append(",开出", new ForegroundColorSpan(whiteColor))
+ .append(noticeInfo.getGiftName() + "", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
}
}
@@ -1143,7 +1139,7 @@ public class MessageView extends FrameLayout {
case CustomAttachment.CUSTOM_MSG_SUB_DATING_SELECT:
text.append("本轮您选择了 ", new ForegroundColorSpan(whiteColor))
.append((notifyInfo.getTargetPosition() + 1) + "号" + (notifyInfo.getTargetGender() == 1 ? "男" : "女") + "嘉宾:", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(roomTipNickColor),
+ .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1157,7 +1153,7 @@ public class MessageView extends FrameLayout {
break;
case CustomAttachment.CUSTOM_MSG_SUB_DATING_PUBLISH_LIKE:
if (notifyInfo.getHasSelectUser()) {
- text.append(notifyInfo.getNickname(), new ForegroundColorSpan(roomTipNickColor),
+ text.append(notifyInfo.getNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1168,7 +1164,7 @@ public class MessageView extends FrameLayout {
}
})
.append(" 的心动对象是 ", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(roomTipNickColor),
+ .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1179,7 +1175,7 @@ public class MessageView extends FrameLayout {
}
});
} else {
- text.append(notifyInfo.getNickname(), new ForegroundColorSpan(roomTipNickColor),
+ text.append(notifyInfo.getNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1194,7 +1190,7 @@ public class MessageView extends FrameLayout {
break;
case CustomAttachment.CUSTOM_MSG_SUB_DATING_PUBLISH_HEART:
text.append("恭喜 ", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getNickname(), new ForegroundColorSpan(roomTipNickColor),
+ .append(notifyInfo.getNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1205,7 +1201,7 @@ public class MessageView extends FrameLayout {
}
})
.append(" 和 ", new ForegroundColorSpan(whiteColor))
- .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(roomTipNickColor),
+ .append(notifyInfo.getTargetNickname(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1234,10 +1230,10 @@ public class MessageView extends FrameLayout {
TarotMsgBean tarotMsgBean = attachment.getTarotMsgBean();
String nickName = RegexUtil.getPrintableString(tarotMsgBean.getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("恭喜 ", new ForegroundColorSpan(textColor))
- .append(nickName, new ForegroundColorSpan(roomTipNickColor))
- .append(" " + tarotMsgBean.getDrawMsgText(), new ForegroundColorSpan(textColor))
- .append(tarotMsgBean.getDrawGoldNum() + "钻石", new ForegroundColorSpan(roomTipColor));
+ .append("恭喜 ", new ForegroundColorSpan(greyColor))
+ .append(nickName, new ForegroundColorSpan(appColor))
+ .append(" " + tarotMsgBean.getDrawMsgText(), new ForegroundColorSpan(whiteColor))
+ .append(tarotMsgBean.getDrawGoldNum() + "钻石", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
}
}
@@ -1257,15 +1253,15 @@ public class MessageView extends FrameLayout {
String nick = TextUtils.isEmpty(joinMiniWorldNoticeAttachment.getNick()) ? "" : joinMiniWorldNoticeAttachment.getNick();
String worldName = TextUtils.isEmpty(joinMiniWorldNoticeAttachment.getWorldName()) ? "" : joinMiniWorldNoticeAttachment.getWorldName();
SpannableBuilder append = new SpannableBuilder(tvContent)
- .append("欢迎")
+ .append("欢迎", new ForegroundColorSpan(greyColor))
.append(" " + nick + " ", new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
UserInfoDialog.showNewUserInfoDialog(mContext, joinMiniWorldNoticeAttachment.getUid());
}
- }, new ForegroundColorSpan(roomTipNickColor))
- .append("加入")
- .append(" 【" + worldName + "】 ", new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ }, new ForegroundColorSpan(appColor))
+ .append("加入", new ForegroundColorSpan(whiteColor))
+ .append(" 【" + worldName + "】 ", new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (onClick != null) {
@@ -1286,7 +1282,7 @@ public class MessageView extends FrameLayout {
String openNickname = RegexUtil.getPrintableString(roomMsg.getOpenRedEnvelopeUserNick());
String sendNickname = RegexUtil.getPrintableString(roomMsg.getRedEnvelopeMasterNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(openNickname, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(openNickname, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1295,8 +1291,8 @@ public class MessageView extends FrameLayout {
}
}
})
- .append("打开", new ForegroundColorSpan(textColor))
- .append(sendNickname, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append("打开", new ForegroundColorSpan(greyColor))
+ .append(sendNickname, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (clickConsumer != null) {
@@ -1307,15 +1303,15 @@ public class MessageView extends FrameLayout {
switch (roomMsg.getRedEnvelopeType()) {
case ALL_DIAMOND:
case ROOM_DIAMOND:
- text.append("的红包领取了", new ForegroundColorSpan(textColor))
- .append((int) roomMsg.getAmount() + "钻石", new ForegroundColorSpan(roomTipColor));
+ text.append("的红包领取了", new ForegroundColorSpan(whiteColor))
+ .append((int) roomMsg.getAmount() + "钻石", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
break;
case ALL_GIFT:
case ROOM_GIFT:
- text.append("的红包领取了价值", new ForegroundColorSpan(textColor))
- .append((int) roomMsg.getAmount() + "钻石", new ForegroundColorSpan(roomTipColor))
- .append("的礼物", new ForegroundColorSpan(textColor));
+ text.append("的红包领取了价值", new ForegroundColorSpan(whiteColor))
+ .append((int) roomMsg.getAmount() + "钻石", new ForegroundColorSpan(appColor))
+ .append("的礼物", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
tvContent.setOnClickListener(null);
@@ -1366,19 +1362,19 @@ public class MessageView extends FrameLayout {
boolean follow = roomFollowOwnerAttachment.isFollow();
SpannableBuilder append = new SpannableBuilder(tvContent)
- .append("欢迎")
+ .append("欢迎", new ForegroundColorSpan(greyColor))
.append(" " + nick + " ", new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
UserInfoDialog.showNewUserInfoDialog(mContext, userInfo.getUid());
}
- }, new ForegroundColorSpan(roomTipNickColor))
+ }, new ForegroundColorSpan(appColor))
.append("关注房主不迷路哦")
.append(follow ? "已关注" : "关注",
new RadiusBackgroundSpan(
- follow ? Color.parseColor("#4cFFFFFF") : ContextCompat.getColor(tvContent.getContext(), R.color.appColor),
+ follow ? Color.parseColor("#4cFFFFFF") : appColor,
SizeUtils.dp2px(tvContent.getContext(), 8),
- follow ? Color.parseColor("#D8FFFFFF") : Color.WHITE,
+ follow ? Color.parseColor("#D8FFFFFF") : whiteColor,
(int) (tvContent.getTextSize() - SizeUtils.sp2px(tvContent.getContext(), 2) - .5f),
SizeUtils.dp2px(tvContent.getContext(), 8), SizeUtils.dp2px(tvContent.getContext(), 4)),
follow ? null : new OriginalDrawStatusClickSpan() {
@@ -1405,7 +1401,7 @@ public class MessageView extends FrameLayout {
return;
}
tvContent.setBackground(null);
- tvContent.setTextColor(Color.WHITE);
+ tvContent.setTextColor(whiteColor);
tvContent.setPadding(0, 0, 0, 0);
SpannableBuilder append = new SpannableBuilder(tvContent)
.append(mContext.getResources().getDrawable(R.drawable.bg_follow), ScreenUtil.dip2px(228), ScreenUtil.dip2px(34));
@@ -1423,7 +1419,7 @@ public class MessageView extends FrameLayout {
return;
}
tvContent.setBackground(null);
- tvContent.setTextColor(Color.WHITE);
+ tvContent.setTextColor(whiteColor);
tvContent.setPadding(0, 0, 0, 0);
SpannableBuilder append = new SpannableBuilder(tvContent)
.append(mContext.getResources().getDrawable(R.drawable.bg_wish_complete_msg), ScreenUtil.dip2px(171), ScreenUtil.dip2px(35));
@@ -1434,7 +1430,7 @@ public class MessageView extends FrameLayout {
Map micMemberMap = attachment.getRoomPKInvitedUpMicMemberMap();
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("房主/管理员邀请");
+ .append("房主/管理员邀请", new ForegroundColorSpan(whiteColor));
boolean isHaveInTeam = false;
Iterator> iterator = micMemberMap.entrySet().iterator();
while (iterator.hasNext()) {
@@ -1445,7 +1441,7 @@ public class MessageView extends FrameLayout {
}
isHaveInTeam = true;
- text.append(value.getNick(), new ForegroundColorSpan(roomTipColor),
+ text.append(value.getNick(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1455,7 +1451,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append("进入");
+ .append("进入", new ForegroundColorSpan(whiteColor));
if (value.getGroupType() == PKTeamInfo.TEAM_RED) {
text.append("红队", new ForegroundColorSpan(tvContent.getResources().getColor(R.color.color_FB3D74)))
.append(",");
@@ -1496,8 +1492,8 @@ public class MessageView extends FrameLayout {
private void stopRoomPkModeMsg(TextView tvContent) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("管理员", new ForegroundColorSpan(whiteColor))
- .append("关闭了", new ForegroundColorSpan(greyColor))
+ .append("管理员", new ForegroundColorSpan(appColor))
+ .append("关闭了", new ForegroundColorSpan(whiteColor))
.append("房间 PK 模式", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -1507,7 +1503,7 @@ public class MessageView extends FrameLayout {
SpannableBuilder text = new SpannableBuilder(textView)
.append(String.format(Locale.getDefault(),
"PK开始啦!本次PK时间 %s 秒,快给喜欢的选手投票吧!", roomPkData.getDuration()),
- new ForegroundColorSpan(greyColor));
+ new ForegroundColorSpan(whiteColor));
textView.setText(text.build());
}
@@ -1625,7 +1621,7 @@ public class MessageView extends FrameLayout {
private void startQueuingMicModeMsg(TextView tvContent) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("管理员", new ForegroundColorSpan(whiteColor))
+ .append("管理员", new ForegroundColorSpan(appColor))
.append("开启了", new ForegroundColorSpan(greyColor))
.append("排麦模式", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
@@ -1633,7 +1629,7 @@ public class MessageView extends FrameLayout {
private void stopQueuingMicModeMsg(TextView tvContent) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("管理员", new ForegroundColorSpan(whiteColor))
+ .append("管理员", new ForegroundColorSpan(appColor))
.append("关闭了", new ForegroundColorSpan(greyColor))
.append("排麦模式", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
@@ -1645,7 +1641,7 @@ public class MessageView extends FrameLayout {
SpannableBuilder text = new SpannableBuilder(tvContent)
.append("管理员设置", new ForegroundColorSpan(whiteColor))
.append(String.format(Locale.getDefault(), " %d 麦",
- JavaUtil.str2int(queuingMicInfo.getMicPos()) + 1), new ForegroundColorSpan(greyColor))
+ JavaUtil.str2int(queuingMicInfo.getMicPos()) + 1), new ForegroundColorSpan(appColor))
.append("为自由麦", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -1656,7 +1652,7 @@ public class MessageView extends FrameLayout {
SpannableBuilder text = new SpannableBuilder(tvContent)
.append("管理员关闭", new ForegroundColorSpan(whiteColor))
.append(String.format(Locale.getDefault(), " %d 麦",
- JavaUtil.str2int(queuingMicInfo.getMicPos()) + 1), new ForegroundColorSpan(greyColor))
+ JavaUtil.str2int(queuingMicInfo.getMicPos()) + 1), new ForegroundColorSpan(appColor))
.append("自由麦", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -1664,7 +1660,7 @@ public class MessageView extends FrameLayout {
private void setDragonBarRunawayMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
ChatRoomMessageExtension extension = chatRoomMessage.getChatRoomMessageExtension();
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(Color.WHITE),
+ .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), appColor,
new OriginalDrawStatusClickSpan() {
@Override
@@ -1674,7 +1670,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 之前在本房间由于不明原因退出交友匹配,此次匹配展示为上次数据", new ForegroundColorSpan(roomTipColor));
+ .append(" 之前在本房间由于不明原因退出交友匹配,此次匹配展示为上次数据", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1683,7 +1679,7 @@ public class MessageView extends FrameLayout {
private void setDragonBarCancelMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
ChatRoomMessageExtension extension = chatRoomMessage.getChatRoomMessageExtension();
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(Color.WHITE),
+ .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), appColor,
new OriginalDrawStatusClickSpan() {
@Override
@@ -1693,7 +1689,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 放弃本次匹配", new ForegroundColorSpan(roomTipColor));
+ .append(" 放弃本次匹配", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1713,7 +1709,7 @@ public class MessageView extends FrameLayout {
msg = msg.substring(0, msg.length() - 1);
// 内容
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(Color.WHITE),
+ .append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), appColor,
new OriginalDrawStatusClickSpan() {
@Override
@@ -1723,7 +1719,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 爱心值为 " + msg, new ForegroundColorSpan(roomTipColor));
+ .append(" 爱心值为 " + msg, new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1736,14 +1732,14 @@ public class MessageView extends FrameLayout {
// 内容
SpannableBuilder text = new SpannableBuilder(tvContent)
.append("厉害了!", new ForegroundColorSpan(greyColor))
- .append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
- .append("在魔法帽中获得 ", new ForegroundColorSpan(greyColor))
- .append(attachment.getPrizeName(), new ForegroundColorSpan(Color.WHITE));
+ .append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
+ .append("在魔法帽中获得 ", new ForegroundColorSpan(whiteColor))
+ .append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
if (attachment.getPrizeNum() > 1) {
- text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(roomTipColor));
+ text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(appColor));
}
if (attachment.getSecond() == CUSTOM_MSG_SUB_BOX_ME) {
- text.append("(仅自己可见)", new ForegroundColorSpan(Color.WHITE));
+ text.append("(仅自己可见)", new ForegroundColorSpan(greyColor));
}
tvContent.setText(text.build());
}
@@ -1753,32 +1749,32 @@ public class MessageView extends FrameLayout {
// 内容
SpannableBuilder text = new SpannableBuilder(tvContent)
.append("厉害了 ", new ForegroundColorSpan(greyColor))
- .append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
- .append("在星际探险中获得", new ForegroundColorSpan(greyColor))
- .append(attachment.getPrizeName(), new ForegroundColorSpan(Color.WHITE));
+ .append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
+ .append("在星际探险中获得", new ForegroundColorSpan(whiteColor))
+ .append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
if (attachment.getPrizeNum() > 1) {
- text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(roomTipColor));
+ text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(appColor));
}
tvContent.setText(text.build());
}
private void setUpdateAudioMsg(TextView tvContent) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("消息: ", new ForegroundColorSpan(roomTipColor))
+ .append("消息: ", new ForegroundColorSpan(whiteColor))
.append("管理员开启高音质模式 ", new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
}
private void setUpdateGiftEffectMsg(TextView tvContent) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("消息: ", new ForegroundColorSpan(roomTipColor))
+ .append("消息: ", new ForegroundColorSpan(whiteColor))
.append("管理员已关闭房间内礼物特效,点击底部“更多”图标即可开启", new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
}
private void setUpdateScreenMsg(TextView tvContent, String contentText) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("消息: ", new ForegroundColorSpan(roomTipColor))
+ .append("消息: ", new ForegroundColorSpan(appColor))
.append(contentText, new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
}
@@ -1787,7 +1783,7 @@ public class MessageView extends FrameLayout {
RoomNoticeAttachment attachment = (RoomNoticeAttachment) message.getAttachment();
RoomMessageViewNoticeInfo messageViewNoticeInfo = attachment.getRoomMessageViewNoticeInfo();
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("消息: ", new ForegroundColorSpan(roomTipColor))
+ .append("消息: ", new ForegroundColorSpan(appColor))
.append(messageViewNoticeInfo.getTips(), new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
}
@@ -1796,8 +1792,8 @@ public class MessageView extends FrameLayout {
CleanScreenAttachment attachment = (CleanScreenAttachment) message.getAttachment();
// 内容
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(attachment.getRoleType() == 1 ? "房主" : "管理员", new ForegroundColorSpan(Color.WHITE))
- .append("(" + attachment.getNick() + ") ", new ForegroundColorSpan(roomTipColor),
+ .append(attachment.getRoleType() == 1 ? "房主" : "管理员", new ForegroundColorSpan(whiteColor))
+ .append("(" + attachment.getNick() + ") ", new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
@@ -1807,7 +1803,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append("已清空公屏消息", new ForegroundColorSpan(Color.WHITE));
+ .append("已清空公屏消息", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1829,9 +1825,9 @@ public class MessageView extends FrameLayout {
private void setInviteUpMicMsg(TextView tvContent, RoomQueueMsgAttachment attachment) {
String targetNick = RegexUtil.getPrintableString(attachment.targetNick);
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("管理员将 ", new ForegroundColorSpan(greyColor))
- .append(targetNick, new ForegroundColorSpan(roomTipColor))
- .append(" 抱上麦 ", new ForegroundColorSpan(greyColor));
+ .append("管理员将 ", new ForegroundColorSpan(whiteColor))
+ .append(targetNick, new ForegroundColorSpan(appColor))
+ .append(" 抱上麦 ", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -1839,7 +1835,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(attachment.handleNick);
String targetNick = RegexUtil.getPrintableString(attachment.targetNick);
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(targetNick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(targetNick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1848,8 +1844,8 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 被 ", new ForegroundColorSpan(greyColor))
- .append(nick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(" 被 ", new ForegroundColorSpan(whiteColor))
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1858,7 +1854,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 请下麦 ", new ForegroundColorSpan(greyColor));
+ .append(" 请下麦 ", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1868,7 +1864,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(attachment.handleNick);
String targetNick = RegexUtil.getPrintableString(attachment.targetNick);
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(targetNick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(targetNick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1877,8 +1873,8 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 被 ", new ForegroundColorSpan(greyColor))
- .append(nick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(" 被 ", new ForegroundColorSpan(whiteColor))
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1887,7 +1883,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 请出房间 ", new ForegroundColorSpan(greyColor));
+ .append(" 请出房间 ", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -1897,7 +1893,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(attachment.handleNick);
String targetNick = RegexUtil.getPrintableString(attachment.targetNick);
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append(targetNick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(targetNick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1906,8 +1902,8 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 被 ", new ForegroundColorSpan(greyColor))
- .append(nick, new ForegroundColorSpan(roomTipColor), new OriginalDrawStatusClickSpan() {
+ .append(" 被 ", new ForegroundColorSpan(whiteColor))
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -1916,7 +1912,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(" 关进小黑屋 ", new ForegroundColorSpan(greyColor));
+ .append(" 关进小黑屋 ", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -2044,18 +2040,18 @@ public class MessageView extends FrameLayout {
AuctionAttachment auctionAttachment = (AuctionAttachment) attachment;
SpannableBuilder builder = new SpannableBuilder(tvContent);
if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_AUCTION_START) {
- builder.append("房主 开启了竞拍", new ForegroundColorSpan(roomTipNickColor));
+ builder.append("房主 开启了竞拍", new ForegroundColorSpan(appColor));
} else if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_AUCTION_FINISH) {
if (auctionAttachment.getAuctionInfo().getCurMaxUid() > 0) {
senderNick = UserInfoHelper.getUserDisplayName(auctionAttachment.getAuctionInfo().getCurMaxUid() + "");
String voiceActorNick = UserInfoHelper.getUserDisplayName(auctionAttachment.getAuctionInfo().getAuctUid() + "");
- builder.append(senderNick, new ForegroundColorSpan(roomTipNickColor))
+ builder.append(senderNick, new ForegroundColorSpan(appColor))
.append(" 以" + auctionAttachment.getAuctionInfo().getRivals().get(0).getAuctMoney() + "钻石拍下 ")
- .append(voiceActorNick, new ForegroundColorSpan(roomTipNickColor));
+ .append(voiceActorNick, new ForegroundColorSpan(appColor));
} else
- builder.append("房主 结束了竞拍,当前暂无人出价", new ForegroundColorSpan(roomTipNickColor));
+ builder.append("房主 结束了竞拍,当前暂无人出价", new ForegroundColorSpan(appColor));
} else {
- builder.append(senderNick, new ForegroundColorSpan(roomTipNickColor))
+ builder.append(senderNick, new ForegroundColorSpan(appColor))
.append(" 出价" + auctionAttachment.getAuctionInfo().getRivals().get(0).getAuctMoney() + "钻石");
}
tvContent.setText(builder.build());
@@ -2072,9 +2068,9 @@ public class MessageView extends FrameLayout {
if (TextUtils.isEmpty(roomTipAttachment.getNick())) roomTipAttachment.setNick("");
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(RegexUtil.getPrintableString(roomTipAttachment.getNick()), new ForegroundColorSpan(roomTipColor))
+ .append(RegexUtil.getPrintableString(roomTipAttachment.getNick()), new ForegroundColorSpan(appColor))
.append(roomTipAttachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_ROOM_TIP_SHARE_ROOM ?
- " 分享了房间" : " 关注了房主", new ForegroundColorSpan(greyColor));
+ " 分享了房间" : " 关注了房主", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -2088,8 +2084,8 @@ public class MessageView extends FrameLayout {
if (TextUtils.isEmpty(roomTipAttachment.getNick())) roomTipAttachment.setNick("");
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(RegexUtil.getPrintableString(roomTipAttachment.getNick()), new ForegroundColorSpan(roomTipColor))
- .append(" 收藏了房间", new ForegroundColorSpan(greyColor));
+ .append(RegexUtil.getPrintableString(roomTipAttachment.getNick()), new ForegroundColorSpan(appColor))
+ .append(" 收藏了房间", new ForegroundColorSpan(whiteColor));
tvContent.setText(text.build());
}
@@ -2147,7 +2143,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(giftAttachment.getMultiGiftReceiveInfo().getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2158,7 +2154,7 @@ public class MessageView extends FrameLayout {
})
.append(" 全麦送出 ", new ForegroundColorSpan(whiteColor))
.append(giftInfo == null ? "" : giftInfo.getGiftUrl(), giftLength, giftLength)
- .append("X" + giftAttachment.getMultiGiftReceiveInfo().getGiftNum(), new ForegroundColorSpan(whiteColor));
+ .append("X" + giftAttachment.getMultiGiftReceiveInfo().getGiftNum(), new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -2183,7 +2179,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(giftAttachment.getMultiLuckyGiftReceiveInfo().getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2195,7 +2191,7 @@ public class MessageView extends FrameLayout {
.append(" 全麦送出 ", new ForegroundColorSpan(whiteColor));
text.append(luckyGiftInfo.getGiftName() + "给", new ForegroundColorSpan(whiteColor))
- .append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (clickConsumer != null) {
@@ -2203,13 +2199,15 @@ public class MessageView extends FrameLayout {
}
}
});
- text.append(",爆出了");
+ text.append(",爆出了", new ForegroundColorSpan(whiteColor));
for (GiftList luckyGiftList : luckyGiftInfo.getGiftList()) {
if (luckyGiftList.getGiftInfo() == null) continue;
- text.append("价值" + luckyGiftList.getGiftInfo().getGoldPrice() + "钻石的")
+ text.append("价值", new ForegroundColorSpan(whiteColor))
+ .append(luckyGiftList.getGiftInfo().getGoldPrice() + "钻石", new ForegroundColorSpan(appColor))
+ .append("的礼物", new ForegroundColorSpan(whiteColor))
.append(luckyGiftList.getGiftInfo().getGiftUrl(), giftLength, giftLength)
.append("X" + luckyGiftList.getGiftNum(), new ForegroundColorSpan(whiteColor))
- .append("、");
+ .append("、", new ForegroundColorSpan(whiteColor));
}
Editable msg = text.builder;
msg.delete(msg.length() - 1, msg.length());
@@ -2238,7 +2236,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(giftAttachment.getMultiLuckyGiftReceiveInfo().getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2250,7 +2248,7 @@ public class MessageView extends FrameLayout {
.append(" 送出 ", new ForegroundColorSpan(whiteColor));
text.append(luckyGiftInfo.getGiftName() + "给", new ForegroundColorSpan(whiteColor))
- .append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(luckyGiftInfo.getUser().getNick(), new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (clickConsumer != null) {
@@ -2258,13 +2256,15 @@ public class MessageView extends FrameLayout {
}
}
});
- text.append(",爆出了");
+ text.append(",爆出了", new ForegroundColorSpan(whiteColor));
for (GiftList luckyGiftList : luckyGiftInfo.getGiftList()) {
if (luckyGiftList.getGiftInfo() == null) continue;
- text.append("价值" + luckyGiftList.getGiftInfo().getGoldPrice() + "钻石的礼物")
+ text.append("价值", new ForegroundColorSpan(whiteColor))
+ .append(luckyGiftList.getGiftInfo().getGoldPrice() + "钻石", new ForegroundColorSpan(appColor))
+ .append("的礼物", new ForegroundColorSpan(whiteColor))
.append(luckyGiftList.getGiftInfo().getGiftUrl(), giftLength, giftLength)
.append("X" + luckyGiftList.getGiftNum(), new ForegroundColorSpan(whiteColor))
- .append("、");
+ .append("、", new ForegroundColorSpan(whiteColor));
}
@@ -2288,7 +2288,7 @@ public class MessageView extends FrameLayout {
String nick = RegexUtil.getPrintableString(attachment.getGiftMultiReceiverInfo().getNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2300,7 +2300,7 @@ public class MessageView extends FrameLayout {
.append(" 送给 ", new ForegroundColorSpan(whiteColor));
for (GiftReceiver targetUser : attachment.getGiftMultiReceiverInfo().getTargetUsers()) {
- text.append(targetUser.getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ text.append(targetUser.getNick(), new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2335,7 +2335,7 @@ public class MessageView extends FrameLayout {
boolean showEffect = multiMagicReceivedInfo.isNeedShowExplode();
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (clickConsumer != null) {
@@ -2346,7 +2346,7 @@ public class MessageView extends FrameLayout {
.append(" 全麦施魔法 ", new ForegroundColorSpan(whiteColor))
.append(magicInfo == null ? "" : TextUtils.isEmpty(magicInfo.getIcon()) ? "" : magicInfo.getIcon(), giftLength, giftLength)
.append(showEffect ? " 并 " : "", new ForegroundColorSpan(whiteColor))
- .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(roomTipNickColor));
+ .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -2369,7 +2369,7 @@ public class MessageView extends FrameLayout {
boolean showEffect = magicMultiReceiverInfo.isNeedShowExplode();
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
if (clickConsumer != null) {
@@ -2380,7 +2380,7 @@ public class MessageView extends FrameLayout {
.append(" 给 ", new ForegroundColorSpan(whiteColor));
for (MagicReceiver targetUser : magicMultiReceiverInfo.getTargetUsers()) {
- text.append(targetUser.getNick(), new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ text.append(targetUser.getNick(), new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2389,7 +2389,7 @@ public class MessageView extends FrameLayout {
}
}
})
- .append(",");
+ .append(",",new ForegroundColorSpan(whiteColor));
}
Editable msg = text.builder;
msg.delete(msg.length() - 1, msg.length());
@@ -2398,7 +2398,7 @@ public class MessageView extends FrameLayout {
.append(magicInfo == null ? "" : TextUtils.isEmpty(magicInfo.getIcon()) ? "" : magicInfo.getIcon(), giftLength, giftLength)
.append(" X" + magicMultiReceiverInfo.getNumber(), new ForegroundColorSpan(whiteColor))
.append(showEffect ? " 并 " : "", new ForegroundColorSpan(whiteColor))
- .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(roomTipNickColor));
+ .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -2421,7 +2421,7 @@ public class MessageView extends FrameLayout {
String targetNick = RegexUtil.getPrintableString(magicReceivedInfo.getTargetNick());
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2431,7 +2431,7 @@ public class MessageView extends FrameLayout {
}
})
.append(" 给 ", new ForegroundColorSpan(whiteColor))
- .append(targetNick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(targetNick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2443,7 +2443,7 @@ public class MessageView extends FrameLayout {
.append(" 施魔法 ", new ForegroundColorSpan(whiteColor))
.append(magicInfo == null ? "" : TextUtils.isEmpty(magicInfo.getIcon()) ? "" : magicInfo.getIcon(), giftLength, giftLength)
.append(showEffect ? " 并 " : "", new ForegroundColorSpan(whiteColor))
- .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(roomTipNickColor));
+ .append(showEffect ? " 触发暴击 " : "", new ForegroundColorSpan(appColor));
tvContent.setText(text.build());
tvContent.setOnClickListener(null);
tvContent.setMovementMethod(new LinkMovementMethod());
@@ -2464,7 +2464,7 @@ public class MessageView extends FrameLayout {
String num = "X" + giftReceiveInfo.getGiftNum();
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(getNewUserDrawable(chatRoomMessage), badgeWidth, badgeHeight)
- .append(nick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(nick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2474,7 +2474,7 @@ public class MessageView extends FrameLayout {
}
})
.append(" 送给 ", new ForegroundColorSpan(whiteColor))
- .append(targetNick, new ForegroundColorSpan(roomTipNickColor), new OriginalDrawStatusClickSpan() {
+ .append(targetNick, new ForegroundColorSpan(appColor), new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2520,7 +2520,7 @@ public class MessageView extends FrameLayout {
SpannableBuilder text = new SpannableBuilder(tvContent);
//等级
text.append(userLevel, expLevelWidth, expLevelHeight);
- text.append(senderNick, new ForegroundColorSpan(roomTipColor),
+ text.append(senderNick, new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View view) {
@@ -2532,7 +2532,7 @@ public class MessageView extends FrameLayout {
});
text.append(TextUtils.isEmpty(carName) ? "" : " 驾着 ", new ForegroundColorSpan(greyColor))
- .append(carName, new ForegroundColorSpan(roomTipColor));
+ .append(carName, new ForegroundColorSpan(appColor));
String enterText = " 进入了房间 ";
if (fromType == AVRoomActivity.FROM_TYPE_RECOMMEND) {
enterText = " 根据首页推荐进入了房间";
@@ -2540,7 +2540,7 @@ public class MessageView extends FrameLayout {
if (fromType == AVRoomActivity.FROM_TYPE_USER || fromType == AVRoomActivity.FROM_TYPE_HELLO) {
String finalFromUid = fromUid;
text.append(" 跟随 ", new ForegroundColorSpan(whiteColor))
- .append(fromNick, new ForegroundColorSpan(roomTipColor),
+ .append(fromNick, new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View view) {
@@ -2555,7 +2555,7 @@ public class MessageView extends FrameLayout {
if (fromType == AVRoomActivity.FROM_TYPE_GAME_RECOMMEND) {
String finalFromUid = fromUid;
text.append(" 接受 ", new ForegroundColorSpan(whiteColor))
- .append(fromNick, new ForegroundColorSpan(roomTipColor),
+ .append(fromNick, new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View view) {
@@ -2618,12 +2618,12 @@ public class MessageView extends FrameLayout {
private SpannableBuilder getNotificationBuilder(TextView tvContent, String senderNick, String desc, String tagNick, String carName) {
return new SpannableBuilder(tvContent)
- .append(senderNick, new ForegroundColorSpan(roomTipColor))
- .append(desc, new ForegroundColorSpan(textColor))
- .append(tagNick, new ForegroundColorSpan(roomTipColor))
+ .append(senderNick, new ForegroundColorSpan(appColor))
+ .append(desc, new ForegroundColorSpan(whiteColor))
+ .append(tagNick, new ForegroundColorSpan(appColor))
.append((TextUtils.isEmpty(carName) ? "" : " 驾着 "))
- .append(carName, new ForegroundColorSpan(roomTipColor))
- .append("进入了房间", new ForegroundColorSpan(textColor));
+ .append(carName, new ForegroundColorSpan(appColor))
+ .append("进入了房间", new ForegroundColorSpan(whiteColor));
}
/**
@@ -2649,9 +2649,9 @@ public class MessageView extends FrameLayout {
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(icNotification, width, sysIconHeight)
.append(" 恭喜 ", new ForegroundColorSpan(greyColor))
- .append(senderNick, new ForegroundColorSpan(roomTipColor))
- .append(" 在房间内" + (second == CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE ? "续费" : "开通") + "\"", new ForegroundColorSpan(greyColor))
- .append(nobleInfo.getName(), new ForegroundColorSpan(roomTipColor))
+ .append(senderNick, new ForegroundColorSpan(appColor))
+ .append(" 在房间内" + (second == CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE ? "续费" : "开通") + "\"", new ForegroundColorSpan(whiteColor))
+ .append(nobleInfo.getName(), new ForegroundColorSpan(appColor))
.append("\"");
tvContent.setText(text.build());
}
@@ -2659,7 +2659,7 @@ public class MessageView extends FrameLayout {
private void setKitchenMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
if (chatRoomMessage.getAttachment() instanceof RoomKitchenAttachment) {
RoomKitchenAttachment attachment = (RoomKitchenAttachment) chatRoomMessage.getAttachment();
- tvContent.setText(MsgBuilder.buildKitchenMsg(attachment, roomTipNickColor).build());
+ tvContent.setText(MsgBuilder.buildKitchenMsg(attachment, appColor).build());
if (MsgBuilder.setUpKitchenClick(tvContent, attachment.getSkipUrl(), attachment.getNeedLevel())) {
tvContent.setOnClickListener(null);
@@ -2701,7 +2701,7 @@ public class MessageView extends FrameLayout {
//开启和关闭ktv模式的消息
if (second == CustomAttachment.CUSTOM_MSG_SUB_KTV_OPEN || second == CustomAttachment.CUSTOM_MSG_SUB_KTV_CLOSE) {
SpannableBuilder text = new SpannableBuilder(tvContent)
- .append("消息: ", new ForegroundColorSpan(roomTipColor))
+ .append("消息: ", new ForegroundColorSpan(appColor))
.append(tip, new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
return;
@@ -2712,7 +2712,7 @@ public class MessageView extends FrameLayout {
nick = RegexUtil.getPrintableString(nick);
SpannableBuilder text = new SpannableBuilder(tvContent)
.append(nick,
- new ForegroundColorSpan(roomTipNickColor))
+ new ForegroundColorSpan(appColor))
.append(tip, new ForegroundColorSpan(greyColor));
if (attachment.getSecond() != CustomAttachment.CUSTOM_MSG_SUB_KTV_FINISH) {//结束的消息不需要拼接歌曲名
text.append(musicInfo.getMusicName());
@@ -2734,9 +2734,9 @@ public class MessageView extends FrameLayout {
// 内容
SpannableBuilder text = new SpannableBuilder(tvContent)
.append("【签到瓜分百万】哇塞,恭喜 ", new ForegroundColorSpan(greyColor))
- .append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
+ .append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
.append("签到获得 ", new ForegroundColorSpan(greyColor))
- .append(attachment.getGoldNum() + "钻石", new ForegroundColorSpan(roomTipColor))
+ .append(attachment.getGoldNum() + "钻石", new ForegroundColorSpan(appColor))
.append("!", new ForegroundColorSpan(greyColor));
tvContent.setText(text.build());
}
@@ -2760,7 +2760,7 @@ public class MessageView extends FrameLayout {
String fromAccount = chatRoomMessage.getFromAccount();
SpannableBuilder text = new SpannableBuilder(tvContent);
text.append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()),
- new ForegroundColorSpan(greyColor),
+ new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
@@ -2769,7 +2769,7 @@ public class MessageView extends FrameLayout {
}
})
.append(":" + welcomeInfo.getLastConent(), new ForegroundColorSpan(whiteColor))
- .append(welcomeInfo.getTargetNick(), new ForegroundColorSpan(roomTipNickColor),
+ .append(welcomeInfo.getTargetNick(), new ForegroundColorSpan(appColor),
new OriginalDrawStatusClickSpan() {
@Override
public void onClick(@NonNull View widget) {
diff --git a/app/src/main/java/com/nnbc123/app/ui/user/UserInfoActivity.java b/app/src/main/java/com/nnbc123/app/ui/user/UserInfoActivity.java
index a46768a00..e35c37837 100644
--- a/app/src/main/java/com/nnbc123/app/ui/user/UserInfoActivity.java
+++ b/app/src/main/java/com/nnbc123/app/ui/user/UserInfoActivity.java
@@ -23,6 +23,7 @@ import androidx.viewpager.widget.ViewPager;
import com.google.android.material.appbar.AppBarLayout;
import com.netease.nim.uikit.StatusBarUtil;
import com.netease.nim.uikit.common.util.sys.ClipboardUtil;
+import com.netease.nim.uikit.common.util.sys.ScreenUtil;
import com.netease.nim.uikit.impl.cache.NimUserInfoCache;
import com.netease.nimlib.sdk.RequestCallbackWrapper;
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
@@ -243,12 +244,13 @@ public class UserInfoActivity extends BaseBindingActivity {
mBinding.viewPager.setCurrentItem(position);
});
magicIndicatorAdapter.setTextSize(18);
- magicIndicatorAdapter.setMinScale(0.77f);
+ magicIndicatorAdapter.setMinScale(0.777f);
magicIndicatorAdapter.setResId(R.drawable.ic_home_indicator_center);
commonNavigator.setTitleWrapContent(true);
commonNavigator.setAdapter(magicIndicatorAdapter);
diff --git a/app/src/main/java/com/nnbc123/app/ui/widget/GiftDialog.java b/app/src/main/java/com/nnbc123/app/ui/widget/GiftDialog.java
index 28f4595f6..0a307f91e 100644
--- a/app/src/main/java/com/nnbc123/app/ui/widget/GiftDialog.java
+++ b/app/src/main/java/com/nnbc123/app/ui/widget/GiftDialog.java
@@ -201,6 +201,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
private TextView tvWeekStarEmpty;
private View ivWeekIn;
private View llStarWeek;
+ private View rlAvatars;
public GiftDialog(Context context, int giftId) {
this(context, 0, true, false, true, giftId);
@@ -479,6 +480,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
tvSelectAll.setOnClickListener(v -> avatarListAdapter.selectAll());
ivLuckyBagIntro.setOnClickListener(this);
findViewById(R.id.ll_gold).setOnClickListener(this);
+ rlAvatars = findViewById(R.id.rl_avatars);
if (giftId == 0) {
// 更新所有礼物
showGiftTab();
@@ -510,17 +512,19 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
descLayout.setVisibility(View.GONE);
if (micMemberInfos != null && micMemberInfos.size() > 0) {
llAvatarList.setVisibility(View.VISIBLE);
+ rlAvatars.setVisibility(View.VISIBLE);
avatarListAdapter = new GiftAvatarAdapter(getContext());
avatarListAdapter.setMicMemberInfos(micMemberInfos);
avatarListAdapter.setOnItemSelectedListener(this);
avatarList.setAdapter(avatarListAdapter);
} else {
+ rlAvatars.setVisibility(View.GONE);
llAvatarList.setVisibility(View.GONE);
}
} else {
llAvatarList.setVisibility(View.GONE);
descLayout.setVisibility(View.VISIBLE);
-
+ rlAvatars.setVisibility(View.VISIBLE);
Single single = UserModel.get().getUserInfo(uid);
if (context instanceof RxAppCompatActivity) {
@@ -829,7 +833,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
drawGiftHelper.setDrawEnable(false);
drawGiftHelper.resetDrawGiftView();
boolean isDrawGiftTab = giftIndicator.getCurrrentType() == GiftIndicator.TYPE_DRAW_GIFT;
- sendGiftButton.setBackgroundResource(R.drawable.bg_magic_dialog_button_send);
+ sendGiftButton.setBackgroundResource(isDrawGiftTab ? R.drawable.bg_magic_dialog_button_send_draw : R.drawable.bg_magic_dialog_button_send);
sendGiftButton.setEnabled(!isDrawGiftTab);
giftNumLayout.setVisibility(isDrawGiftTab ? View.GONE : View.VISIBLE);
}
diff --git a/app/src/main/res/drawable-xhdpi/ic_room_message.png b/app/src/main/res/drawable-xhdpi/ic_room_message.png
new file mode 100644
index 000000000..749aa25aa
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_room_message.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_room_message_income.png b/app/src/main/res/drawable-xhdpi/ic_room_message_income.png
new file mode 100644
index 000000000..cf4ec665c
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_room_message_income.png differ
diff --git a/app/src/main/res/drawable-xhdpi/icon_room_send_gift.png b/app/src/main/res/drawable-xhdpi/icon_room_send_gift.png
index 6a0b8adad..4f16a8b1d 100644
Binary files a/app/src/main/res/drawable-xhdpi/icon_room_send_gift.png and b/app/src/main/res/drawable-xhdpi/icon_room_send_gift.png differ
diff --git a/app/src/main/res/drawable/shape_bdbfd0_corner.xml b/app/src/main/res/drawable/shape_bdbfd0_corner.xml
new file mode 100644
index 000000000..9b45508d3
--- /dev/null
+++ b/app/src/main/res/drawable/shape_bdbfd0_corner.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/shape_room_message_bg.xml b/app/src/main/res/drawable/shape_room_message_bg.xml
index 7b6a20baf..f61c68618 100644
--- a/app/src/main/res/drawable/shape_room_message_bg.xml
+++ b/app/src/main/res/drawable/shape_room_message_bg.xml
@@ -1,7 +1,7 @@
-
+
- @color/primary_dark
+ @color/app_248cfe
#9AC7FD
#bbbbbb
#f5f5f5
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9a3563ffd..34e7dcca2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -103,7 +103,7 @@
实名认证
关联房间
- 仅%s或%s的用于可发起聊天
+ 仅%s或%s的用户可发起聊天
房主已下线
更多好玩的房间在音萌等您哟!去看看!
diff --git a/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message.png b/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message.png
deleted file mode 100644
index 2e2c51f9f..000000000
Binary files a/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message.png and /dev/null differ
diff --git a/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message_income.png b/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message_income.png
deleted file mode 100644
index 3477d9f30..000000000
Binary files a/app/src/module_room_chat/res/drawable-xhdpi/ic_room_message_income.png and /dev/null differ