福袋飘屏改为svga
This commit is contained in:
BIN
app/src/main/assets/svga/lucky_gift_notify.svga
Normal file
BIN
app/src/main/assets/svga/lucky_gift_notify.svga
Normal file
Binary file not shown.
@@ -1107,6 +1107,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
attachment.setLuckyBagNoticeInfo(JSON.parseObject(String.valueOf(baseProtocol.getData()), LuckyBagNoticeInfo.class));
|
||||
ChatRoomMessage message = ChatRoomMessageBuilder.createChatRoomCustomMessage(String.valueOf(AvRoomDataManager.get().getRoomId()), attachment);
|
||||
IMNetEaseManager.get().noticeServiceLuckyBagNotice(message);
|
||||
IMNetEaseManager.get().addMessages(message);
|
||||
}
|
||||
break;
|
||||
case CUSTOM_MSG_ROOM_PK:
|
||||
|
@@ -82,6 +82,7 @@ import com.yizhuan.xchat_android_core.gift.bean.GiftList;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiveInfo;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.GiftReceiver;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagGifts;
|
||||
import com.yizhuan.xchat_android_core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.yizhuan.xchat_android_core.helper.ImHelperUtils;
|
||||
import com.yizhuan.xchat_android_core.home.event.FollowRoomEvent;
|
||||
import com.yizhuan.xchat_android_core.home.model.CollectionRoomModel;
|
||||
@@ -110,6 +111,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.RoomBoxPrizeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomFollowOwnerAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomFollowOwnerAttachment2;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomNoticeAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomReceivedLuckyGiftAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RoomTipAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.TarotAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.TarotMsgBean;
|
||||
@@ -968,6 +970,8 @@ public class MessageView extends FrameLayout {
|
||||
setVipMsg(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_FANS_TEAM) {
|
||||
setFansTeamMsg(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT) {
|
||||
setLuckyGiftServerNotifyMsg(chatRoomMessage, tvContent);
|
||||
} else {
|
||||
tvContent.setTextColor(Color.WHITE);
|
||||
tvContent.setText(tvContent.getResources().getText(R.string.not_support_message_tip));
|
||||
@@ -1057,6 +1061,24 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
}
|
||||
|
||||
private void setLuckyGiftServerNotifyMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
RoomReceivedLuckyGiftAttachment attachment = (RoomReceivedLuckyGiftAttachment) chatRoomMessage.getAttachment();
|
||||
if (attachment.getSecond() == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY) {
|
||||
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));
|
||||
tvContent.setText(text.build());
|
||||
}
|
||||
}
|
||||
|
||||
private void setDatingMsg(ChatRoomMessage chatRoomMessage, TextView tvContent, int second) {
|
||||
if (chatRoomMessage.getAttachment() instanceof DatingAttachment) {
|
||||
DatingAttachment datingAttachment = (DatingAttachment) chatRoomMessage.getAttachment();
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -98,7 +98,7 @@
|
||||
android:id="@+id/fl_svga_vip_notify"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:11"
|
||||
app:layout_constraintDimensionRatio="75:12"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1175,6 +1175,7 @@ public final class IMNetEaseManager {
|
||||
break;
|
||||
case CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY:
|
||||
noticeServiceLuckyBagNotice(msg);
|
||||
addMessages(msg);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@@ -11,4 +11,6 @@ public class LuckyBagNoticeInfo implements Serializable {
|
||||
private String nick;
|
||||
private String luckyBagName;
|
||||
private String giftName;
|
||||
private String roomTitle;
|
||||
private String goldPrice;
|
||||
}
|
||||
|
Reference in New Issue
Block a user