增加魔法帽和星际探险公屏昵称点击事件
This commit is contained in:
@@ -1731,7 +1731,16 @@ public class MessageView extends FrameLayout {
|
|||||||
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
||||||
// 内容
|
// 内容
|
||||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||||
.append("厉害了!", new ForegroundColorSpan(greyColor))
|
.append("厉害了!", new ForegroundColorSpan(appColor),
|
||||||
|
new OriginalDrawStatusClickSpan() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(@NonNull View widget) {
|
||||||
|
if (clickConsumer != null) {
|
||||||
|
Single.just(String.valueOf(attachment.getUid())).subscribe(clickConsumer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
|
.append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
|
||||||
.append("在魔法帽中获得 ", new ForegroundColorSpan(whiteColor))
|
.append("在魔法帽中获得 ", new ForegroundColorSpan(whiteColor))
|
||||||
.append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
|
.append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
|
||||||
@@ -1742,13 +1751,24 @@ public class MessageView extends FrameLayout {
|
|||||||
text.append("(仅自己可见)", new ForegroundColorSpan(greyColor));
|
text.append("(仅自己可见)", new ForegroundColorSpan(greyColor));
|
||||||
}
|
}
|
||||||
tvContent.setText(text.build());
|
tvContent.setText(text.build());
|
||||||
|
tvContent.setOnClickListener(null);
|
||||||
|
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setRadishMeMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
private void setRadishMeMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||||
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
||||||
// 内容
|
// 内容
|
||||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||||
.append("厉害了 ", new ForegroundColorSpan(greyColor))
|
.append("厉害了 ", new ForegroundColorSpan(appColor),
|
||||||
|
new OriginalDrawStatusClickSpan() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(@NonNull View widget) {
|
||||||
|
if (clickConsumer != null) {
|
||||||
|
Single.just(String.valueOf(attachment.getUid())).subscribe(clickConsumer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
|
.append(attachment.getNick() + " ", new ForegroundColorSpan(appColor))
|
||||||
.append("在星际探险中获得", new ForegroundColorSpan(whiteColor))
|
.append("在星际探险中获得", new ForegroundColorSpan(whiteColor))
|
||||||
.append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
|
.append(attachment.getPrizeName(), new ForegroundColorSpan(appColor));
|
||||||
@@ -1756,6 +1776,8 @@ public class MessageView extends FrameLayout {
|
|||||||
text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(appColor));
|
text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(appColor));
|
||||||
}
|
}
|
||||||
tvContent.setText(text.build());
|
tvContent.setText(text.build());
|
||||||
|
tvContent.setOnClickListener(null);
|
||||||
|
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUpdateAudioMsg(TextView tvContent) {
|
private void setUpdateAudioMsg(TextView tvContent) {
|
||||||
|
Reference in New Issue
Block a user