全站喇叭
This commit is contained in:
@@ -695,23 +695,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onLinkMicPkStart(final String pkUid, final String pkhead, final String pkname) {
|
||||
Log.e("ry", "pkUid" + pkUid + "pkhead" + pkhead + "pkname" + pkname);
|
||||
// if (isRy == false) {
|
||||
// if (mLiveLinkMicPkPresenter != null && mLiveRoomViewHolder != null) {
|
||||
// mLiveLinkMicPkPresenter.onLinkMicPkStart(pkUid, pkhead, pkname);
|
||||
// Handler handler = new Handler();
|
||||
// handler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// if (mLiveRoomViewHolder != null) {
|
||||
// if (mIsAnchor == false) {
|
||||
// mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }, 4000);//3秒后执行Runnable中的run方法
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1);
|
||||
Handler handler = new Handler();
|
||||
@@ -728,7 +711,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
}, 4000);//3秒后执行Runnable中的run方法
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -737,16 +719,10 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
@Override
|
||||
public void onLinkMicPkClose(int i) {
|
||||
// if (isRy == false) {
|
||||
// if (mLiveLinkMicPkPresenter != null) {
|
||||
// mLiveLinkMicPkPresenter.onLinkMicPkClose(i);
|
||||
// }
|
||||
// } else {
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkClose(i);
|
||||
} else if (mLiveLinkMicPkPresenter != null) {
|
||||
mLiveLinkMicPkPresenter.onLinkMicPkClose(i);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -779,12 +755,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
@Override
|
||||
public void onLinkMicPkEnd(String winUid) {
|
||||
// if (isRy == false) {
|
||||
// if (mLiveLinkMicPkPresenter != null) {
|
||||
// mLiveLinkMicPkPresenter.onLinkMicPkEnd(winUid);
|
||||
// mLiveRoomViewHolder.setDelOtherInfo();
|
||||
// }
|
||||
// } else {
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkEnd(winUid);
|
||||
mLiveRoomViewHolder.setDelOtherInfo();
|
||||
@@ -792,7 +762,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
mLiveLinkMicPkPresenter.onLinkMicPkEnd(winUid);
|
||||
mLiveRoomViewHolder.setDelOtherInfo();
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -945,11 +914,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
onCoinChanged(coin);
|
||||
}
|
||||
String[] data = new String[]{obj.getString("barragetoken")};
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendDanmuMessage(mLiveUid, contents);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents);
|
||||
// }
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
@@ -969,22 +934,14 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
}
|
||||
}
|
||||
int guardType = mLiveGuardInfo != null ? mLiveGuardInfo.getMyGuardType() : Constants.GUARD_TYPE_NONE;
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendChatMessage(mLiveUid, content, mIsAnchor, mSocketUserType, guardType);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendChatMessage(mLiveUid, content, mIsAnchor, mSocketUserType, guardType);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 发 系统 消息
|
||||
*/
|
||||
public static void sendSystemMessage(String content) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendSystemMessage(mLiveUid, content);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendSystemMessage(mLiveUid, content);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -993,12 +950,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
public void sendGiftMessage(LiveGiftBean giftBean, String giftToken, String ancherName, String by) {
|
||||
int guardType = mLiveGuardInfo != null ? mLiveGuardInfo.getMyGuardType() : Constants.GUARD_TYPE_NONE;
|
||||
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendGiftMessage(giftBean.getType(), giftToken, mLiveUid, ancherName, guardType, by);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendGiftMessage(giftBean.getType(), giftToken, mLiveUid, ancherName, guardType, by);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -1006,33 +958,21 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 主播或管理员踢人
|
||||
*/
|
||||
public void kickUser(String toUid, String toName) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendKickMessage(mLiveUid, toUid, toName);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendKickMessage(mLiveUid, toUid, toName);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁言
|
||||
*/
|
||||
public void setShutUp(String toUid, String toName, int type) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendShutUpMessage(mLiveUid, toUid, toName, type);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendShutUpMessage(mLiveUid, toUid, toName, type);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置或取消管理员消息
|
||||
*/
|
||||
public void sendSetAdminMessage(int action, String toUid, String toName) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendSetAdminMessage(mLiveUid, action, toUid, toName);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendSetAdminMessage(mLiveUid, action, toUid, toName);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,22 +980,14 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 超管关闭直播间
|
||||
*/
|
||||
public void superCloseRoom() {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.superCloseRoom(mLiveUid);
|
||||
// } else {
|
||||
SocketRyChatUtil.superCloseRoom(mLiveUid);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新主播映票数
|
||||
*/
|
||||
public void sendUpdateVotesMessage(int deltaVal) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendUpdateVotesMessage(mLiveUid, deltaVal);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendUpdateVotesMessage(mLiveUid, deltaVal);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1063,20 +995,12 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 发送购买守护成功消息
|
||||
*/
|
||||
public void sendBuyGuardMessage(String votes, int guardNum, int guardType) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendBuyGuardMessage(mLiveUid, votes, guardNum, guardType);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendBuyGuardMessage(mLiveUid, votes, guardNum, guardType);
|
||||
// }
|
||||
}
|
||||
|
||||
public void sendBuyGuardMessage2(String votes, int guardNum, int guardType, String ancherName, String liveId) {
|
||||
if (guardType != 1) {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendBuyGuardMessage2(mLiveUid, votes, guardNum, guardType, ancherName, liveId);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendBuyGuardMessage2(mLiveUid, votes, guardNum, guardType, ancherName, liveId);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1084,11 +1008,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 发送发红包成功消息
|
||||
*/
|
||||
public void sendRedPackMessage() {
|
||||
// if (isRy == false) {
|
||||
// SocketChatUtil.sendRedPackMessage(mLiveUid);
|
||||
// } else {
|
||||
SocketRyChatUtil.sendRedPackMessage(mLiveUid);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1196,8 +1116,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
public void onItemClick(String type) {
|
||||
if (Constants.LINK.equals(type)) {
|
||||
copyLink();
|
||||
} else {
|
||||
// shareLive(type, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1271,9 +1189,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
|
||||
if(list.isEmpty()){
|
||||
if (list.isEmpty()) {
|
||||
openNewBuyGuardWindow(true);
|
||||
}else {
|
||||
} else {
|
||||
LiveNewGuardListDialogFragment fragment = new LiveNewGuardListDialogFragment();
|
||||
fragment.setList(list);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
@@ -1353,7 +1271,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
bundle.putString(Constants.STREAM, mStream);
|
||||
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
|
||||
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
|
||||
bundle.putBoolean("guard",isEmpty);
|
||||
bundle.putBoolean("guard", isEmpty);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
|
||||
}
|
||||
|
||||
@@ -577,7 +577,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (verticalViewPager.ismEnableScroll()) {
|
||||
LiveBean liveBean = e.getLiveBean();
|
||||
if (liveBean != null) {
|
||||
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.ROOM_CHARGE);
|
||||
@@ -590,13 +589,10 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mAncherName = liveBean.getUserNiceName();
|
||||
mAncherIcon = liveBean.getAvatar();
|
||||
manager.onAdd(liveBean, mLiveType, mLiveTypeVal, mLiveSDK);
|
||||
|
||||
}
|
||||
} else {
|
||||
verticalViewPager.setEnableScroll(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -774,11 +770,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
verticalViewPager.setCurrentItem(mCurrentPage + 1);
|
||||
break;
|
||||
case REFRESH_THE_LIVEl_PAGE:
|
||||
// loadingView.show();
|
||||
// AnchorRecommendItemModel model = event.getAnchorRecommendItemModel();
|
||||
// itemModelList.add(0, model);
|
||||
// mPagerAdapter.notifyDataSetChanged();
|
||||
// verticalViewPager.setCurrentItem(0);
|
||||
getDrawer();
|
||||
break;
|
||||
case REPORT:
|
||||
@@ -802,6 +793,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
case ONLINE:
|
||||
toSysMsgWeb("3");
|
||||
break;
|
||||
case TRUMPET_NOTIFY:
|
||||
manager.showFullScreen(event.getMsgModel());
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
//单选选中监听
|
||||
radioHornType.setOnCheckedChangeListener(changeListener);
|
||||
radioHornType.getCheckedRadioButtonId();
|
||||
// netHandler.post(getNobleTrumpetNumRunnable);
|
||||
netHandler.post(getNobleTrumpetNumRunnable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yunbao.live.event;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.bean.OpenParametersModel;
|
||||
|
||||
@@ -16,7 +17,16 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
private LiveBean bean;
|
||||
private int liveType;
|
||||
private int liveTypeVal;
|
||||
private MsgModel msgModel;//全服消息
|
||||
|
||||
public MsgModel getMsgModel() {
|
||||
return msgModel;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setMsgModel(MsgModel msgModel) {
|
||||
this.msgModel = msgModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLiveType() {
|
||||
return liveType;
|
||||
@@ -118,7 +128,8 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
REPORT(16, "舉報"),
|
||||
POPULAR(17, "人气票任务"),
|
||||
NOTICE(18, "系统通知"),
|
||||
ONLINE(19, "在线客服");
|
||||
ONLINE(19, "在线客服"),
|
||||
TRUMPET_NOTIFY(20, "全服喇叭");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.yunbao.common.bean.SocketModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@@ -35,6 +36,7 @@ import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.LiveUserGiftBean;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.views.LiveEndViewHolder;
|
||||
import com.yunbao.live.views.LivePlayKsyViewHolder;
|
||||
import com.yunbao.live.views.LivePlayRyViewHolder;
|
||||
@@ -369,7 +371,7 @@ public class SocketRyClient {
|
||||
mListener.onPrizePoolUp(map.getString("uplevel"));
|
||||
break;
|
||||
case Constants.SOCKET_HOUR://小时榜
|
||||
liveChatBean=new LiveChatBean();
|
||||
liveChatBean = new LiveChatBean();
|
||||
liveChatBean.setId("-1");
|
||||
liveChatBean.setType(LiveChatAdapter.MSG_HOUR_RANK_CHANGE);
|
||||
liveChatBean.setContent(map.getJSONObject("ct").getString("text"));
|
||||
@@ -451,7 +453,10 @@ public class SocketRyClient {
|
||||
SocketModel model = GsonUtils.fromJson(socketMsg, SocketModel.class);
|
||||
List<MsgModel> msg = model.getMsg();
|
||||
if (msg.size() > 0) {
|
||||
EventBus.getDefault().post(msg.get(0));
|
||||
// EventBus.getDefault().post(msg.get(0));
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.TRUMPET_NOTIFY)
|
||||
.setMsgModel(msg.get(0)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,14 +20,12 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ViewFlipper;
|
||||
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.event.MessageIMEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@@ -70,7 +68,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
private String url;
|
||||
private View v_msg_redpoint, stationHornBanner;
|
||||
private Activity context;
|
||||
private SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow, svga_station_horn;
|
||||
private SVGAImageView svga_new_user_gif, svga_new_user_double, svga_new_user_follow;
|
||||
private ViewFlipper viewFlipper;
|
||||
private TextView goToRomm;
|
||||
private int icon = 0;
|
||||
@@ -191,7 +189,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
svga_new_user_gif = (SVGAImageView) findViewById(R.id.svga_new_user_gif);
|
||||
svga_new_user_double = (SVGAImageView) findViewById(R.id.svga_new_user_double);
|
||||
svga_new_user_follow = (SVGAImageView) findViewById(R.id.svga_new_user_follow);
|
||||
svga_station_horn = (SVGAImageView) findViewById(R.id.svga_station_horn);
|
||||
viewFlipper = (ViewFlipper) findViewById(R.id.viewflipper_banner);
|
||||
stationHornBanner = findViewById(R.id.station_horn_banner);
|
||||
liveNewPeople.setOnClickListener(this);
|
||||
@@ -239,65 +236,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
v_msg_redpoint = (View) findViewById(R.id.v_msg_redpoint);
|
||||
//获取系统未读消息
|
||||
MessageIMManager.get(mContext).getSystemMessages();
|
||||
//全站喇叭
|
||||
svga_station_horn.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStep(int frame, double percentage) {
|
||||
Log.e("SVGADynamicEntity", "frame:" + frame);
|
||||
Log.e("SVGADynamicEntity", "percentage:" + percentage);
|
||||
if ((int) (percentage * 100) == 5) {
|
||||
viewFlipper.removeAllViews();
|
||||
stationHornBanner.setVisibility(View.VISIBLE);
|
||||
if ((nobleName + nobleTtext).length() > 15) {
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
//展示内容子布局
|
||||
View childrenView = LayoutInflater.from(mContext).inflate(R.layout.view_whole_station_horn, null, false);
|
||||
ImageView iconImg = childrenView.findViewById(R.id.icon_img);
|
||||
TextView userName = childrenView.findViewById(R.id.rc_user_name);
|
||||
TextView userText = childrenView.findViewById(R.id.rc_user_text);
|
||||
userName.setText(nobleName);
|
||||
userText.setText(" : " + nobleTtext);
|
||||
ImgLoader.display2(mContext, icon, iconImg);
|
||||
viewFlipper.addView(childrenView);
|
||||
}
|
||||
|
||||
} else {
|
||||
//展示内容子布局
|
||||
View childrenView = LayoutInflater.from(mContext).inflate(R.layout.view_whole_station_horn, null, false);
|
||||
ImageView iconImg = childrenView.findViewById(R.id.icon_img);
|
||||
TextView userName = childrenView.findViewById(R.id.rc_user_name);
|
||||
TextView userText = childrenView.findViewById(R.id.rc_user_text);
|
||||
userName.setText(nobleName);
|
||||
userText.setText(" : " + nobleTtext);
|
||||
ImgLoader.display2(mContext, icon, iconImg);
|
||||
viewFlipper.addView(childrenView);
|
||||
}
|
||||
|
||||
}
|
||||
if ((int) (percentage * 100) == 50 && viewFlipper.getChildCount() > 1) {
|
||||
viewFlipper.showNext();
|
||||
}
|
||||
if ((int) (percentage * 100) == 92) {
|
||||
stationHornBanner.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
});
|
||||
//底部改造
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.total_image), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
@@ -440,7 +379,8 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
public void onMessageIMEvent(MessageIMEvent event) {
|
||||
//判断消息中心红点是否已经展示,如果已经展示并且未读消息大于0则不再执行之后的逻辑
|
||||
int number = event.getMessage();
|
||||
if (v_msg_redpoint.getVisibility() == View.VISIBLE && number > 0 || SpUtil.getInstance().getBooleanValue("private_chat_message_switch")) return;
|
||||
if (v_msg_redpoint.getVisibility() == View.VISIBLE && number > 0 || SpUtil.getInstance().getBooleanValue("private_chat_message_switch"))
|
||||
return;
|
||||
if (number > 0) {
|
||||
v_msg_redpoint.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
@@ -520,41 +460,5 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 全站喇叭
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMsgModelEvent(MsgModel model) {
|
||||
nobleName = model.getUserName();
|
||||
nobleTtext = model.getTrumpetMsg();
|
||||
if (!svga_station_horn.isAnimating()) {
|
||||
svga_station_horn.setLoops(1);
|
||||
String backPath = "";
|
||||
|
||||
if (model.getNobleId() == 5) {
|
||||
backPath = "icon_livemsgbg_guowang.svga";
|
||||
icon = R.mipmap.imng_guowang;
|
||||
} else if (model.getNobleId() == 6) {
|
||||
backPath = "icon_livemsgbg_huangdi.svga";
|
||||
icon = R.mipmap.img_huangdi;
|
||||
} else {
|
||||
backPath = "icon_livemsgbg_chaohuang.svga";
|
||||
icon = R.mipmap.img_chaohuang;
|
||||
}
|
||||
new SVGAParser(mContext).decodeFromAssets(backPath, new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onComplete(SVGAVideoEntity videoItem) {
|
||||
SVGADrawable drawable = new SVGADrawable(videoItem);
|
||||
svga_station_horn.setImageDrawable(drawable);
|
||||
svga_station_horn.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Log.e("errqs", "errl");
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.API;
|
||||
@@ -78,6 +79,7 @@ import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.weight.FullServiceNotificationView;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
@@ -282,6 +284,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private ConstraintLayout msgLayout; //悬浮窗
|
||||
private TextView msgNumber;//悬浮窗左上角数标
|
||||
private RoundedImageView msgUserIcon; //悬浮窗icon
|
||||
private FullServiceNotificationView fullScreen;//全副喇叭
|
||||
|
||||
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
||||
super(context, parentView);
|
||||
@@ -605,6 +608,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void init() {
|
||||
EventBus.getDefault().register(this);
|
||||
btnEvent = findViewById(R.id.btn_event);
|
||||
fullScreen = (FullServiceNotificationView) findViewById(R.id.full_screen);
|
||||
btnEvent3 = findViewById(R.id.btn_event3);
|
||||
imgEvent = (ImageView) findViewById(R.id.img_event);
|
||||
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
|
||||
@@ -731,7 +735,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
findViewById(R.id.hot_btn).setOnClickListener(this);
|
||||
try {
|
||||
Glide.with(mContext).asGif().load(R.drawable.fans_medal).into(mViewMedal);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
System.err.println("发生异常行为");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1708,7 +1712,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
} else if (i == R.id.user_guard) {
|
||||
// ((LiveActivity) mContext).openUserMoreListWindow(2, true);
|
||||
((LiveActivity) mContext).openNewGuardListWindow();
|
||||
} if (i == R.id.lt_trickery) {
|
||||
}
|
||||
if (i == R.id.lt_trickery) {
|
||||
showTrickeryDialog();
|
||||
}
|
||||
|
||||
@@ -1800,7 +1805,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
public void onSuccess(List<Conversation> conversations) {
|
||||
if (conversations != null && !conversations.isEmpty()) {
|
||||
for (Conversation conversation : conversations) {
|
||||
if(conversation.getUnreadMessageCount()!=0){
|
||||
if (conversation.getUnreadMessageCount() != 0) {
|
||||
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId());
|
||||
if (userInfo != null) {
|
||||
ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon);
|
||||
@@ -1809,7 +1814,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
}
|
||||
changeMsgView(msg2,msg);
|
||||
changeMsgView(msg2, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2873,4 +2878,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服喇叭
|
||||
*
|
||||
* @param msgModel
|
||||
*/
|
||||
public void showFullScreen(MsgModel msgModel) {
|
||||
fullScreen.setUserNameAndUserText(msgModel.getUserName(), msgModel.getTrumpetMsg())
|
||||
.setType(msgModel.getRoleType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.custom.MyViewPager;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
@@ -535,7 +536,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
}
|
||||
|
||||
//是否处于返回键
|
||||
//是否处于返回键 全服通知
|
||||
private boolean isBackPressed = false;
|
||||
|
||||
@Override
|
||||
@@ -1514,4 +1515,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服喇叭
|
||||
*
|
||||
* @param msgModel
|
||||
*/
|
||||
public void showFullScreen(MsgModel msgModel) {
|
||||
mLiveRoomViewHolder.showFullScreen(msgModel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user