feat : 新增BOOM 公屏消息, 封禁弹窗功能修改 , 修复部分发现的bug
This commit is contained in:
@@ -51,11 +51,11 @@ class RoomBoomInfoDialog : BaseDialogFragment<DialogRoomBoomInfoBinding>() {
|
||||
}
|
||||
|
||||
private fun setView(boomInfos: List<BoomInfo>) {
|
||||
|
||||
boomInfos.forEachIndexed{ index, boomInfo ->
|
||||
val sortedByDescending = boomInfos.sortedByDescending { it.level }
|
||||
sortedByDescending.forEachIndexed{ index, boomInfo ->
|
||||
val levelView = ItemRoomBoomInfoLevelBinding.inflate(layoutInflater, binding.levelLayout, true)
|
||||
levelView.root.setBackgroundResource(R.color.transparent)
|
||||
levelView.levelText.text="LV.${index+1}"
|
||||
levelView.levelText.text="LV.${boomInfo.level}"
|
||||
levelView.levelIcon.loadImage(boomInfo.pic)
|
||||
levelView.root.tag = boomInfo
|
||||
levelView.root.setOnClickListener {
|
||||
|
@@ -4,12 +4,11 @@ import android.content.Context
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.Window
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.bindadapter.BaseAdapter
|
||||
import com.chwl.app.bindadapter.BindingViewHolder
|
||||
import com.chwl.app.databinding.RoomNotifyBoomRewardBinding
|
||||
import com.chwl.app.databinding.RoomNotifyBoomRewardItemBinding
|
||||
import com.chwl.app.databinding.RoomBoomRewardBinding
|
||||
import com.chwl.app.databinding.RoomBoomRewardItemBinding
|
||||
import com.chwl.app.ui.utils.loadImage
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.gift.bean.BoomMsgAwardBean
|
||||
@@ -17,22 +16,22 @@ import com.chwl.library.common.util.isVerify
|
||||
import com.chwl.library.common.util.setViewWH
|
||||
import com.chwl.library.common.util.setVis
|
||||
|
||||
class RoomNotifyBoomRewardDialog(private val context: Context) :
|
||||
BaseRoomNotifyDialog<RoomNotifyBoomRewardBinding>(context) {
|
||||
class RoomBoomRewardDialog(private val context: Context) :
|
||||
BaseRoomNotifyDialog<RoomBoomRewardBinding>(context) {
|
||||
|
||||
var list : List<BoomMsgAwardBean>?=null
|
||||
|
||||
|
||||
var mAdapter = object : BaseAdapter<BoomMsgAwardBean>(R.layout.room_notify_boom_reward_item, 1) {
|
||||
var mAdapter = object : BaseAdapter<BoomMsgAwardBean>(R.layout.room_boom_reward_item, 1) {
|
||||
override fun convert(helper: BindingViewHolder, item: BoomMsgAwardBean?) {
|
||||
val binding = RoomNotifyBoomRewardItemBinding.bind(helper.itemView)
|
||||
val binding = RoomBoomRewardItemBinding.bind(helper.itemView)
|
||||
binding.boomItem.loadImage(item?.awardPic)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun createBinding(inflater: LayoutInflater): RoomNotifyBoomRewardBinding {
|
||||
return RoomNotifyBoomRewardBinding.inflate(inflater)
|
||||
override fun createBinding(inflater: LayoutInflater): RoomBoomRewardBinding {
|
||||
return RoomBoomRewardBinding.inflate(inflater)
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,6 @@ import com.chwl.app.friend.view.SelectFriendActivity
|
||||
import com.chwl.app.home.adapter.RoomActAdapter
|
||||
import com.chwl.app.music.widget.MusicPlayerView
|
||||
import com.chwl.app.room_chat.activity.RoomMsgActivity
|
||||
import com.chwl.app.ui.utils.BoomUtil
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.app.ui.utils.loadImage
|
||||
import com.chwl.app.ui.webview.CommonWebViewActivity
|
||||
|
@@ -26,7 +26,7 @@ import com.chwl.app.databinding.LayoutRoomNotifyLuckyGiftTipBinding;
|
||||
import com.chwl.app.utils.GiftAnimUtil;
|
||||
import com.chwl.app.utils.NumberUtils;
|
||||
import com.chwl.app.utils.RoomBoomManager;
|
||||
import com.chwl.app.utils.RoomNotifyManager;
|
||||
import com.chwl.app.utils.RoomNotifyDialogManager;
|
||||
import com.chwl.app.utils.WeakPool;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.gift.bean.CpMsgBean;
|
||||
@@ -524,7 +524,7 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
luckyGiftTipPool.clear();
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
RoomNotifyManager.INSTANCE. clear();
|
||||
RoomNotifyDialogManager.INSTANCE. clear();
|
||||
RoomBoomManager.INSTANCE. clear();
|
||||
|
||||
if (giftView != null) {
|
||||
@@ -766,7 +766,7 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
private void showLuckyGiftDlg(LuckyGiftMsgAllBean data) {
|
||||
//todo do 校验数据是否异常
|
||||
RoomNotifyManager.INSTANCE.addDialog(new RoomNotifyDialogBean(
|
||||
RoomNotifyDialogManager.INSTANCE.addDialog(new RoomNotifyDialogBean(
|
||||
CustomAttachment.CUSTOM_MSG_SUPER_LUCKY_GIFT_TEMPLATE,
|
||||
CustomAttachment.CUSTOM_MSG_SUPER_LUCKY_GIFT_ROOM,
|
||||
data
|
||||
@@ -781,7 +781,7 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
||||
//todo do 校验数据是否异常
|
||||
CpMsgBean cpMsgBean = roomEvent.getCpMsgBean();
|
||||
if (cpMsgBean != null) {
|
||||
RoomNotifyManager.INSTANCE.addDialog(new RoomNotifyDialogBean(
|
||||
RoomNotifyDialogManager.INSTANCE.addDialog(new RoomNotifyDialogBean(
|
||||
CustomAttachment.CP_FIRST,
|
||||
cpMsgBean.getSecond(),
|
||||
cpMsgBean
|
||||
|
@@ -238,11 +238,7 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
// openMic.setImageResource(R.drawable.room_menu_ic_mic_close);
|
||||
// }
|
||||
|
||||
//
|
||||
RoomInfo currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (currentRoomInfo != null) {
|
||||
openMic.setEnabled(true);
|
||||
if(!AudioEngineManager.get().isMute()){
|
||||
if (isOpen) {
|
||||
if (AudioEngineManager.get().isNotRecord()) {
|
||||
openMic.setImageResource(R.drawable.room_menu_ic_mic_music);
|
||||
} else {
|
||||
@@ -251,10 +247,24 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
} else {
|
||||
openMic.setImageResource(R.drawable.room_menu_ic_mic_close);
|
||||
}
|
||||
} else {
|
||||
openMic.setEnabled(false);
|
||||
openMic.setImageResource(R.drawable.room_menu_ic_mic_close);
|
||||
}
|
||||
|
||||
//
|
||||
// RoomInfo currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
// if (currentRoomInfo != null) {
|
||||
// openMic.setEnabled(true);
|
||||
// if(!AudioEngineManager.get().isMute()){
|
||||
// if (AudioEngineManager.get().isNotRecord()) {
|
||||
// openMic.setImageResource(R.drawable.room_menu_ic_mic_music);
|
||||
// } else {
|
||||
// openMic.setImageResource(R.drawable.room_menu_ic_mic_open);
|
||||
// }
|
||||
// }else{
|
||||
// openMic.setImageResource(R.drawable.room_menu_ic_mic_close);
|
||||
// }
|
||||
// } else {
|
||||
// openMic.setEnabled(false);
|
||||
// openMic.setImageResource(R.drawable.room_menu_ic_mic_close);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -490,10 +500,12 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
contentView = LayoutInflater.from(getContext()).inflate(R.layout.popup_mic_set, null);
|
||||
micSetPopupWindow = new PopupWindow(contentView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
micSetPopupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
micSetPopupWindow.setTouchable(true);
|
||||
micSetPopupWindow.setFocusable(false);
|
||||
micSetPopupWindow.setOutsideTouchable(true);
|
||||
// micSetPopupWindow.setTouchable(true);
|
||||
// micSetPopupWindow.setFocusable(false);
|
||||
// micSetPopupWindow.setAnimationStyle(R.style.style_anim_mic_set);
|
||||
} else {
|
||||
if (micSetPopupWindow.isShowing()) return;
|
||||
contentView = micSetPopupWindow.getContentView();
|
||||
}
|
||||
|
||||
@@ -526,7 +538,7 @@ public class BottomView extends LinearLayout implements View.OnClickListener {
|
||||
int[] vLoc = new int[2];
|
||||
parent.getLocationInWindow(vLoc);
|
||||
try {
|
||||
micSetPopupWindow.showAsDropDown(parent,0, -ScreenUtil.dip2px(180),Gravity.CENTER_HORIZONTAL);
|
||||
micSetPopupWindow.showAsDropDown(parent,0, -ScreenUtil.dip2px(190),Gravity.CENTER_HORIZONTAL);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package com.chwl.app.avroom.widget;
|
||||
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.BOOM_FIRST;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.BOOM_SECOND_DIALOG;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_FAIRY;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_GIFT_COMPOUND;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_RED_PACKAGE;
|
||||
@@ -58,6 +60,8 @@ import com.chwl.app.photo.BigPhotoActivity;
|
||||
import com.chwl.app.photo.PagerOption;
|
||||
import com.chwl.app.ui.widget.TextSpannableBuilder;
|
||||
import com.chwl.app.utils.ObjectTypeHelper;
|
||||
import com.chwl.core.gift.bean.BoomMsgDialogBean;
|
||||
import com.chwl.core.im.custom.bean.BoomMsgAttachment;
|
||||
import com.chwl.core.im.custom.bean.TemplateMessageAttachment;
|
||||
import com.chwl.core.monsterhunting.bean.MonsterDataBean;
|
||||
import com.chwl.core.utils.extension.StringExtensionKt;
|
||||
@@ -246,6 +250,8 @@ public class MessageView extends FrameLayout {
|
||||
private int expLevelWidth;
|
||||
private int expLevelHeight;
|
||||
private int giftLength;
|
||||
private int boomWidth;
|
||||
private int boomHeight;
|
||||
private volatile boolean needAutoScroll = true;//是否自動滾動到底部
|
||||
private Consumer<String> clickConsumer;
|
||||
private OnClick onClick;
|
||||
@@ -269,7 +275,9 @@ public class MessageView extends FrameLayout {
|
||||
mMessageAdapter.notifyDataSetChanged();
|
||||
messageListView.post(() -> {
|
||||
needAutoScroll = true;
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
messageListView.scrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -319,7 +327,9 @@ public class MessageView extends FrameLayout {
|
||||
this.allMessages.addAll(tmpList);
|
||||
addMsgByType(tmpList,false);
|
||||
}
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
messageListView.scrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
disposable = AvRoomDataManager.get().getChatRoomMsgProcessor()
|
||||
.subscribe(this::onCurrentRoomReceiveNewMsg);
|
||||
}
|
||||
@@ -367,6 +377,8 @@ public class MessageView extends FrameLayout {
|
||||
expLevelHeight = Utils.dip2px(context, 18);
|
||||
expLevelWidth = expLevelHeight * 36 / 18;//expLevelHeight * 114 / 45
|
||||
giftLength = Utils.dip2px(context, 35);
|
||||
boomWidth = Utils.dip2px(context, 41);
|
||||
boomHeight = Utils.dip2px(context, 60);
|
||||
// 內容區域
|
||||
layoutManger = new LinearLayoutManager(context, RecyclerView.VERTICAL, false);
|
||||
FrameLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
@@ -404,7 +416,10 @@ public class MessageView extends FrameLayout {
|
||||
tvBottomTip.setOnClickListener(v -> {
|
||||
tvBottomTip.setVisibility(GONE);
|
||||
needAutoScroll = true;
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
messageListView.smoothScrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
|
||||
});
|
||||
addView(tvBottomTip);
|
||||
|
||||
@@ -512,7 +527,9 @@ public class MessageView extends FrameLayout {
|
||||
List<ChatRoomMessage> msgs = new ArrayList<>();
|
||||
msgs.add(msg);
|
||||
addMsgByType(msgs,false);
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
mMessageAdapter.notifyItemInserted(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
showTipsOrScrollToBottom();
|
||||
checkAtMe(msg, false);
|
||||
keepSizeUnderLimit();
|
||||
@@ -522,7 +539,9 @@ public class MessageView extends FrameLayout {
|
||||
allMessages.addAll(allMessages.size() > 0 ? 1 : 0, messages);
|
||||
addMsgByType(messages,true);
|
||||
mMessageAdapter.notifyDataSetChanged();
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
messageListView.scrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
for (ChatRoomMessage message : messages) {
|
||||
checkAtMe(message, true);
|
||||
}
|
||||
@@ -591,8 +610,11 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (mMessageAdapter.getItemCount() - 1 >= 0) {
|
||||
messageListView.smoothScrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void release() {
|
||||
|
||||
@@ -982,6 +1004,11 @@ public class MessageView extends FrameLayout {
|
||||
} else {
|
||||
getTemplateMessageAdapter().convert(tvContent, null);
|
||||
}
|
||||
} else if (first == BOOM_FIRST) {
|
||||
if (second == BOOM_SECOND_DIALOG) {
|
||||
BoomMsgAttachment boomMsgAttachment = (BoomMsgAttachment) chatRoomMessage.getAttachment();
|
||||
setMsgBoom(tvContent, boomMsgAttachment);
|
||||
}
|
||||
} else {
|
||||
tvContent.setTextColor(Color.WHITE);
|
||||
tvContent.setText(tvContent.getResources().getText(R.string.not_support_message_tip));
|
||||
@@ -2664,6 +2691,26 @@ public class MessageView extends FrameLayout {
|
||||
tvContent.setOnClickListener(null);
|
||||
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||
}
|
||||
/**
|
||||
* {boom图片} 恭喜! {用户名} 触发了超级大奖BOOM...
|
||||
*/
|
||||
private void setMsgBoom(TextView tvContent, BoomMsgAttachment boomMsgAttachment) {
|
||||
if (boomMsgAttachment == null || boomMsgAttachment.DialogBean == null) return;
|
||||
BoomMsgDialogBean data = boomMsgAttachment.DialogBean;
|
||||
String boomUrl = data.getPic();
|
||||
String nick = RegexUtil.getPrintableString(data.getNick());
|
||||
|
||||
TextSpannableBuilder text = new TextSpannableBuilder(tvContent)
|
||||
.append(boomUrl, boomWidth, boomHeight)
|
||||
.append(ResUtil.getString(R.string.avroom_widget_roomeffectview_04), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
||||
.append(" "+nick+" ", new ForegroundColorSpan(Color.parseColor("#FF3b3b")))
|
||||
.append(ResUtil.getString(R.string.roomBoomMessageView), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||
|
||||
tvContent.setText(text.build());
|
||||
tvContent.setOnClickListener(null);
|
||||
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||
tvContent.setBackgroundResource(R.drawable.shape_room_message_bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}xxx來了
|
||||
|
@@ -51,14 +51,19 @@ import com.chwl.app.utils.RoomBoomManager;
|
||||
import com.chwl.core.gift.bean.BoomMsgAnimBean;
|
||||
import com.chwl.core.gift.bean.BoomMsgDialogBean;
|
||||
import com.chwl.core.im.custom.bean.BoomMsgAttachment;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
import com.chwl.core.utils.LogUtils;
|
||||
import com.chwl.library.language.LanguageHelper;
|
||||
import com.example.lib_utils.UiUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nimlib.chatroom.model.ChatRoomMessageImpl;
|
||||
import com.netease.nimlib.sdk.NIMSDK;
|
||||
import com.netease.nimlib.sdk.Observer;
|
||||
import com.netease.nimlib.sdk.chatroom.model.ChatRoomMessage;
|
||||
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
|
||||
import com.netease.nimlib.sdk.msg.model.BroadcastMessage;
|
||||
import com.netease.nimlib.session.IMMessageImpl;
|
||||
import com.orhanobut.logger.Logger;
|
||||
import com.readystatesoftware.systembartint.SystemBarTintManager;
|
||||
import com.tbruyelle.rxpermissions2.RxPermissions;
|
||||
@@ -1185,14 +1190,15 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
BoomMsgDialogBean bean = JSON.parseObject(String.valueOf(baseProtocol.getData()), BoomMsgDialogBean.class);
|
||||
RoomBoomManager.INSTANCE.addDialog(bean);
|
||||
|
||||
// BoomMsgAnimBean boomMsgAnimBean = new BoomMsgAnimBean();
|
||||
// boomMsgAnimBean.countDownUrl = bean.getCountDownVapUrl();
|
||||
// boomMsgAnimBean.endUrl = bean.getEndVapUrl();
|
||||
// boomMsgAnimBean.level = bean.getLevel();
|
||||
// RoomBoomManager.INSTANCE.addAnim(boomMsgAnimBean);
|
||||
|
||||
RoomBoomManager.INSTANCE.notify(bean);
|
||||
|
||||
BoomMsgAttachment boomMsgAttachment = new BoomMsgAttachment(BOOM_FIRST, BOOM_SECOND_DIALOG);
|
||||
boomMsgAttachment.DialogBean = bean;
|
||||
ChatRoomMessage chatRoomMessage = new ChatRoomMessageImpl();
|
||||
chatRoomMessage.setAttachment(boomMsgAttachment);
|
||||
((IMMessageImpl)chatRoomMessage).setMsgType(MsgTypeEnum.custom.getValue());
|
||||
AvRoomDataManager.get().addChatRoomMessage(chatRoomMessage);
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@@ -17,9 +17,7 @@ import com.chwl.app.UIHelper
|
||||
import com.chwl.app.application.IReportConstants
|
||||
import com.chwl.app.application.ReportManager
|
||||
import com.chwl.app.avroom.activity.AVRoomActivity
|
||||
import com.chwl.app.avroom.dialog.RoomBoomInfoDialog
|
||||
import com.chwl.app.avroom.dialog.RoomNotifyBoomDialog
|
||||
import com.chwl.app.avroom.dialog.RoomNotifyBoomRewardDialog
|
||||
import com.chwl.app.avroom.dialog.RoomBoomRewardDialog
|
||||
import com.chwl.app.base.BaseActivity
|
||||
import com.chwl.app.base.BaseFragment
|
||||
import com.chwl.app.databinding.FragmentMeBinding
|
||||
@@ -374,7 +372,7 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
R.id.tv_user_name -> {
|
||||
//todo do 测试按钮
|
||||
if (BuildConfig.DEBUG) {
|
||||
RoomNotifyBoomRewardDialog(requireContext()).apply {
|
||||
RoomBoomRewardDialog(requireContext()).apply {
|
||||
list = arrayListOf(BoomMsgAwardBean().apply {
|
||||
awardPic = "https://img.molistar.xyz/default_avatar_molistar.png"
|
||||
uid = AuthModel.get().currentUid
|
||||
|
@@ -19,7 +19,7 @@ import com.chwl.core.noble.bean.AllServiceGiftProtocol
|
||||
|
||||
class NotifyAdapter : FloatViewAdapter {
|
||||
var onShowUserCard: ((String) -> Unit)? = null
|
||||
|
||||
//todo do 通用飘屏
|
||||
override fun onCreateFloatView(context: Context, item: Any): FloatView? {
|
||||
when (item) {
|
||||
// 通用飘屏
|
||||
|
@@ -46,9 +46,8 @@ public class LogoutHelper {
|
||||
if (e instanceof SocketTimeoutException || e instanceof SocketException || e instanceof HttpException) {
|
||||
activity.toast(ResUtil.getString(R.string.login_helper_logouthelper_013));
|
||||
} else if (e instanceof BanAccountException) {
|
||||
//todo do 封禁 显示id 跟 原因
|
||||
BanAccountException exception = (BanAccountException) e;
|
||||
String text = ResUtil.getString(R.string.login_helper_logouthelper_02) + exception.getMessage() + ResUtil.getString(R.string.login_helper_logouthelper_03);
|
||||
String text = exception.getMessage() + " " +ResUtil.getString(R.string.login_helper_logouthelper_03);
|
||||
int start = text.length();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(ResUtil.getString(R.string.login_helper_logouthelper_04), Locale.ENGLISH);
|
||||
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+08"));
|
||||
|
@@ -1,22 +0,0 @@
|
||||
package com.chwl.app.ui.utils
|
||||
|
||||
import com.chwl.app.R
|
||||
|
||||
object BoomUtil {
|
||||
private var boomTextIcons = arrayListOf(
|
||||
R.drawable.transparent_draw
|
||||
)
|
||||
private var boomRoomIcons = arrayListOf(
|
||||
R.drawable.transparent_draw
|
||||
)
|
||||
|
||||
fun getBoomTextIcon(level: Int) : Int{
|
||||
return boomTextIcons.getOrNull(level)?:R.drawable.transparent_draw
|
||||
}
|
||||
fun getBoomRoomIcon(level: Int) : Int{
|
||||
return boomRoomIcons.getOrNull(level)?:R.drawable.transparent_draw
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@@ -9,7 +9,7 @@ import com.bumptech.glide.request.target.Target
|
||||
import com.chwl.app.application.GlobalHandleManager
|
||||
import com.chwl.app.avroom.dialog.BaseRoomNotifyDialog
|
||||
import com.chwl.app.avroom.dialog.RoomNotifyBoomDialog
|
||||
import com.chwl.app.avroom.dialog.RoomNotifyBoomRewardDialog
|
||||
import com.chwl.app.avroom.dialog.RoomBoomRewardDialog
|
||||
import com.chwl.app.avroom.widget.GalleryLayoutManager.LayoutParams
|
||||
import com.chwl.core.gift.bean.BoomInfo
|
||||
import com.chwl.core.gift.bean.BoomMsgAnimBean
|
||||
@@ -88,12 +88,18 @@ object RoomBoomManager {
|
||||
private fun showNextAnim() {
|
||||
LogUtils.d(" RoomBoomManager showNextAnim()-- start")
|
||||
if (AnimQueue.isNotEmpty() && mAnimLayout != null && !isAnimStart) {
|
||||
val animData = AnimQueue.removeAt(0)
|
||||
// val animData = AnimQueue.removeAt(0)
|
||||
val minBy = AnimQueue.minBy { it.level }
|
||||
val index = AnimQueue.indexOf(minBy)
|
||||
val animData = AnimQueue.removeAt(index)
|
||||
animData?.let { anim ->
|
||||
val urls = arrayListOf<String>()
|
||||
if (animData.countDownUrl.isVerify()) urls.add(animData.countDownUrl)
|
||||
if (animData.endUrl.isVerify()) urls.add(animData.endUrl)
|
||||
if (anim.countDownUrl.isVerify()) urls.add(anim.countDownUrl)
|
||||
if (anim.endUrl.isVerify()) urls.add(anim.endUrl)
|
||||
LogUtils.d(" RoomBoomManager showNextAnim()-- end")
|
||||
startDownAnim(urls, animData)
|
||||
startDownAnim(urls, anim)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,10 +257,10 @@ object RoomBoomManager {
|
||||
val award = awardQueue.removeAt(awardIndex)
|
||||
if (award.list.isVerify()) {
|
||||
val activity = GlobalHandleManager.get().activity ?: return
|
||||
val dialog = RoomNotifyBoomRewardDialog(activity)
|
||||
val dialog = RoomBoomRewardDialog(activity)
|
||||
dialog.list = award.list
|
||||
dialog.setOnDismissListener {
|
||||
startAnimEnd(animData)
|
||||
startAnimEnd(animData,false)
|
||||
}
|
||||
dialog.showDialog()
|
||||
LogUtils.d(" RoomBoomManager showAwardDialog showDialog ")
|
||||
|
@@ -12,7 +12,7 @@ import com.chwl.core.gift.bean.RoomNotifyDialogBean
|
||||
import com.chwl.core.im.custom.bean.CustomAttachment
|
||||
import java.util.LinkedList
|
||||
|
||||
object RoomNotifyManager {
|
||||
object RoomNotifyDialogManager {
|
||||
private val queue = LinkedList<RoomNotifyDialogBean>()
|
||||
private var dialog : BaseRoomNotifyDialog<*>?=null
|
||||
|
@@ -65,7 +65,7 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/room_notify_boom_reward_item" />
|
||||
tools:listitem="@layout/room_boom_reward_item" />
|
||||
|
||||
</FrameLayout>
|
||||
|
@@ -5372,6 +5372,7 @@ You cannot join again within 24 hours after leaving</string>
|
||||
<string name="roomBoomInfoRankTitle">roomBoomInfoRankTitle</string>
|
||||
<string name="roomBoomInfoAwardHint">roomBoomInfoAwardHint</string>
|
||||
<string name="roomBoomInfoAwardBtn">roomBoomInfoAwardBtn</string>
|
||||
<string name="roomBoomMessageView">触发大奖</string>
|
||||
|
||||
|
||||
|
||||
|
@@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.chwl.app.ui.widget.dialog.BaseDialog;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.core.manager.AudioEngineManager;
|
||||
import com.chwl.core.music.model.PlayerModel;
|
||||
|
||||
|
||||
|
@@ -281,10 +281,16 @@ public class PlayerModel extends BaseModel implements IPlayerModel {
|
||||
AudioEngineManager.get().adjustAudioMixingVolume(volume);
|
||||
}
|
||||
|
||||
/**
|
||||
* 此方法是 音乐播放处的 音量调节弹窗 ,音量进度条回调那里 调用
|
||||
*/
|
||||
@Override
|
||||
public void seekRecordingVolume(int volume) {
|
||||
this.recordingVolume = volume;
|
||||
// CommonPref.instance(BasicConfig.INSTANCE.getAppContext()).putInt("recordingVolume", volume);
|
||||
if (AudioEngineManager.get().isNotRecord()){
|
||||
AudioEngineManager.get().setNotRecord(false);
|
||||
}
|
||||
VolumeSetting.putVoiceVolume(volume);
|
||||
AudioEngineManager.get().adjustRecordingSignalVolume(volume);
|
||||
}
|
||||
|
Reference in New Issue
Block a user