完成全服通知功能
This commit is contained in:
parent
28add09f32
commit
b5247df69b
@ -174,6 +174,7 @@ public class Constants {
|
|||||||
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
||||||
public static final String SUPER_VISION = "supervision";//超级发言警告
|
public static final String SUPER_VISION = "supervision";//超级发言警告
|
||||||
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
||||||
|
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
||||||
|
|
||||||
//游戏socket
|
//游戏socket
|
||||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||||
|
@ -0,0 +1,89 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全服通知
|
||||||
|
*/
|
||||||
|
public class CustomFullServiceNotifyEvent extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("_method_")
|
||||||
|
private String method;
|
||||||
|
@SerializedName("action")
|
||||||
|
private String action;
|
||||||
|
@SerializedName("content")//内容
|
||||||
|
private String content;
|
||||||
|
@SerializedName("duration")//展示时长 单位秒
|
||||||
|
private int duration;
|
||||||
|
@SerializedName("img")//图片路径
|
||||||
|
private String img;
|
||||||
|
@SerializedName("msgtype")
|
||||||
|
private String msgtype;
|
||||||
|
@SerializedName("type")//通知类型 1 图片通知 2文字通知
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setAction(String action) {
|
||||||
|
this.action = action;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setDuration(int duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsgtype() {
|
||||||
|
return msgtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setMsgtype(String msgtype) {
|
||||||
|
this.msgtype = msgtype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -1239,6 +1239,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1466,6 +1466,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
mLivePushViewHolder.changeToBig();
|
mLivePushViewHolder.changeToBig();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import com.yunbao.common.bean.AnchorRecommendItemModel;
|
|||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.live.bean.OpenParametersModel;
|
import com.yunbao.live.bean.OpenParametersModel;
|
||||||
|
|
||||||
public class LiveAudienceEvent extends BaseModel {
|
public class LiveAudienceEvent extends BaseModel {
|
||||||
@ -27,6 +28,16 @@ public class LiveAudienceEvent extends BaseModel {
|
|||||||
private JSONArray pkScores;
|
private JSONArray pkScores;
|
||||||
private String uid;
|
private String uid;
|
||||||
private int time;
|
private int time;
|
||||||
|
private CustomFullServiceNotifyEvent customFullServiceNotifyEvent;
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent getCustomFullServiceNotifyEvent() {
|
||||||
|
return customFullServiceNotifyEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAudienceEvent setCustomFullServiceNotifyEvent(CustomFullServiceNotifyEvent customFullServiceNotifyEvent) {
|
||||||
|
this.customFullServiceNotifyEvent = customFullServiceNotifyEvent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public JSONArray getPkScores() {
|
public JSONArray getPkScores() {
|
||||||
return pkScores;
|
return pkScores;
|
||||||
@ -230,7 +241,8 @@ public class LiveAudienceEvent extends BaseModel {
|
|||||||
LEAVE_DR_ROOM(46, "结束多人PK"),
|
LEAVE_DR_ROOM(46, "结束多人PK"),
|
||||||
LEAVE_PK_SCORE(47, "PK排名"),
|
LEAVE_PK_SCORE(47, "PK排名"),
|
||||||
PK_TIME_COUNT(48, "多人PK结束"),
|
PK_TIME_COUNT(48, "多人PK结束"),
|
||||||
DISCONNEXT_PK_TIME(50, "单人Pk结束");
|
DISCONNEXT_PK_TIME(50, "单人Pk结束"),
|
||||||
|
CUSTOM_FULL_SERVICE_NOTIFY(51, "全服通知");
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -30,9 +30,11 @@ import com.yunbao.common.bean.MsgModel;
|
|||||||
import com.yunbao.common.bean.PkRankBean;
|
import com.yunbao.common.bean.PkRankBean;
|
||||||
import com.yunbao.common.bean.SocketModel;
|
import com.yunbao.common.bean.SocketModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.manager.IMRTCManager;
|
import com.yunbao.common.manager.IMRTCManager;
|
||||||
|
import com.yunbao.common.manager.RandomPkManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
@ -50,7 +52,6 @@ import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
|||||||
import com.yunbao.live.bean.LivePKUserListBean;
|
import com.yunbao.live.bean.LivePKUserListBean;
|
||||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.common.manager.RandomPkManager;
|
|
||||||
import com.yunbao.live.views.LiveEndViewHolder;
|
import com.yunbao.live.views.LiveEndViewHolder;
|
||||||
import com.yunbao.live.views.LivePlayKsyViewHolder;
|
import com.yunbao.live.views.LivePlayKsyViewHolder;
|
||||||
import com.yunbao.live.views.LivePlayRyViewHolder;
|
import com.yunbao.live.views.LivePlayRyViewHolder;
|
||||||
@ -428,7 +429,7 @@ public class SocketRyClient {
|
|||||||
case Constants.SOCKET_GAME_ZJH://游戏 智勇三张
|
case Constants.SOCKET_GAME_ZJH://游戏 智勇三张
|
||||||
if (CommonAppConfig.GAME_ENABLE) {
|
if (CommonAppConfig.GAME_ENABLE) {
|
||||||
mListener.onGameZjh(map);
|
mListener.onGameZjh(map);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Constants.SOCKET_GAME_HD://游戏 海盗船长
|
case Constants.SOCKET_GAME_HD://游戏 海盗船长
|
||||||
if (CommonAppConfig.GAME_ENABLE) {
|
if (CommonAppConfig.GAME_ENABLE) {
|
||||||
@ -461,7 +462,7 @@ public class SocketRyClient {
|
|||||||
LiveChatBean chatBean = new LiveChatBean();
|
LiveChatBean chatBean = new LiveChatBean();
|
||||||
chatBean.setId(jsonObject.getString("uid"));
|
chatBean.setId(jsonObject.getString("uid"));
|
||||||
chatBean.setUserNiceName(jsonObject.getString("user_nicename"));
|
chatBean.setUserNiceName(jsonObject.getString("user_nicename"));
|
||||||
if ("1" .equals(map.getString("msgtype"))) {
|
if ("1".equals(map.getString("msgtype"))) {
|
||||||
chatBean.setType(-3);
|
chatBean.setType(-3);
|
||||||
} else {
|
} else {
|
||||||
chatBean.setType(-4);
|
chatBean.setType(-4);
|
||||||
@ -559,6 +560,14 @@ public class SocketRyClient {
|
|||||||
.setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_UPDATE)
|
.setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_UPDATE)
|
||||||
.setObject(pkRankBean));
|
.setObject(pkRankBean));
|
||||||
break;
|
break;
|
||||||
|
case Constants.CUSTOM_FULL_SERVICE_NOTIFY:
|
||||||
|
Log.e("全服通知", map.toString());
|
||||||
|
CustomFullServiceNotifyEvent customFullServiceNotifyEvent = GsonUtils.fromJson(map.toString(), CustomFullServiceNotifyEvent.class);
|
||||||
|
EventBus.getDefault().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.CUSTOM_FULL_SERVICE_NOTIFY)
|
||||||
|
.setCustomFullServiceNotifyEvent(customFullServiceNotifyEvent));
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -648,7 +657,7 @@ public class SocketRyClient {
|
|||||||
|
|
||||||
private static void sendActiveMsg(JSONObject map, SocketReceiveBean received) {
|
private static void sendActiveMsg(JSONObject map, SocketReceiveBean received) {
|
||||||
String msgtype = map.getString("msgtype");
|
String msgtype = map.getString("msgtype");
|
||||||
if ("1" .equals(msgtype)) {//新年大作战活动
|
if ("1".equals(msgtype)) {//新年大作战活动
|
||||||
LiveChatBean chatBean = new LiveChatBean();
|
LiveChatBean chatBean = new LiveChatBean();
|
||||||
chatBean.setId(map.getString("uid"));
|
chatBean.setId(map.getString("uid"));
|
||||||
chatBean.setMedalLevelImageUrl(map.getString("monster_str"));//昵称暂时做为活动图片地址
|
chatBean.setMedalLevelImageUrl(map.getString("monster_str"));//昵称暂时做为活动图片地址
|
||||||
@ -661,14 +670,14 @@ public class SocketRyClient {
|
|||||||
|
|
||||||
private static void wordLightEnterRoom(JSONObject map, SocketReceiveBean received) {
|
private static void wordLightEnterRoom(JSONObject map, SocketReceiveBean received) {
|
||||||
String msgtype = map.getString("msgtype");
|
String msgtype = map.getString("msgtype");
|
||||||
if ("2" .equals(msgtype)) {//发言,点亮
|
if ("2".equals(msgtype)) {//发言,点亮
|
||||||
if ("409002" .equals(received.getRetcode())) {
|
if ("409002".equals(received.getRetcode())) {
|
||||||
ToastUtil.show(R.string.live_you_are_shut);
|
ToastUtil.show(R.string.live_you_are_shut);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//禁言别人,自己发言只能自己看到
|
//禁言别人,自己发言只能自己看到
|
||||||
if ("409100" .equals(received.getRetcode())) {
|
if ("409100".equals(received.getRetcode())) {
|
||||||
String uid = map.getString("uid");
|
String uid = map.getString("uid");
|
||||||
if (!uid.equals(CommonAppConfig.getInstance().getUid())) {
|
if (!uid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||||
return;
|
return;
|
||||||
@ -713,12 +722,12 @@ public class SocketRyClient {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!"" .equals(map.getString("prankIcon")) && map.getString("prankIcon") != null) {
|
if (!"".equals(map.getString("prankIcon")) && map.getString("prankIcon") != null) {
|
||||||
chatBean.setPrankIcon(map.getString("prankIcon"));
|
chatBean.setPrankIcon(map.getString("prankIcon"));
|
||||||
chatBean.setType(-5);
|
chatBean.setType(-5);
|
||||||
}
|
}
|
||||||
mListener.onChat(chatBean, 1);
|
mListener.onChat(chatBean, 1);
|
||||||
} else if ("0" .equals(msgtype)) {//用户进入房间
|
} else if ("0".equals(msgtype)) {//用户进入房间
|
||||||
JSONObject obj = JSON.parseObject(map.getString("ct"));
|
JSONObject obj = JSON.parseObject(map.getString("ct"));
|
||||||
LiveUserGiftBean u = GsonUtils.fromJson(obj.toJSONString(), LiveUserGiftBean.class);
|
LiveUserGiftBean u = GsonUtils.fromJson(obj.toJSONString(), LiveUserGiftBean.class);
|
||||||
UserBean.Vip vip = new UserBean.Vip();
|
UserBean.Vip vip = new UserBean.Vip();
|
||||||
@ -865,7 +874,7 @@ public class SocketRyClient {
|
|||||||
chatBean.setMedal_new(map.getString("medal_new"));
|
chatBean.setMedal_new(map.getString("medal_new"));
|
||||||
chatBean.setGood_nub(map.getString("good_num"));
|
chatBean.setGood_nub(map.getString("good_num"));
|
||||||
chatBean.setType(LiveChatBean.GIFT);
|
chatBean.setType(LiveChatBean.GIFT);
|
||||||
if (map.get("guard_type") != null && !"" .equals(map.get("guard_type")) && !"null" .equals(map.get("guard_type"))) {
|
if (map.get("guard_type") != null && !"".equals(map.get("guard_type")) && !"null".equals(map.get("guard_type"))) {
|
||||||
chatBean.setGuardType(map.getInteger("guard_type"));
|
chatBean.setGuardType(map.getInteger("guard_type"));
|
||||||
}
|
}
|
||||||
if (CommonAppContext.lang.equals("chinese")) {
|
if (CommonAppContext.lang.equals("chinese")) {
|
||||||
|
@ -20,6 +20,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewOutlineProvider;
|
import android.view.ViewOutlineProvider;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.view.animation.AlphaAnimation;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -77,6 +78,7 @@ import com.yunbao.common.bean.RewardAllModel;
|
|||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
import com.yunbao.common.bean.TaskModel;
|
import com.yunbao.common.bean.TaskModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
@ -86,7 +88,6 @@ import com.yunbao.common.http.live.LiveNetManager;
|
|||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.manager.RandomPkManager;
|
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
@ -97,7 +98,6 @@ import com.yunbao.common.utils.SVGAViewUtils;
|
|||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.utils.formatBigNum;
|
import com.yunbao.common.utils.formatBigNum;
|
||||||
import com.yunbao.common.views.AbsViewHolder;
|
import com.yunbao.common.views.AbsViewHolder;
|
||||||
@ -327,6 +327,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
private ViewFlipper flipper;
|
private ViewFlipper flipper;
|
||||||
private TextView mRandomPkTimer;
|
private TextView mRandomPkTimer;
|
||||||
|
|
||||||
|
//全服通知
|
||||||
|
private ImageView customFullServiceNotify;
|
||||||
|
|
||||||
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
||||||
super(context, parentView);
|
super(context, parentView);
|
||||||
@ -1064,6 +1066,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
findViewById(R.id.btn_follow).setVisibility(View.GONE);
|
findViewById(R.id.btn_follow).setVisibility(View.GONE);
|
||||||
findViewById(R.id.live_rank_pk).setVisibility(View.GONE);
|
findViewById(R.id.live_rank_pk).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
customFullServiceNotify = (ImageView) findViewById(R.id.custom_full_service_notify);
|
||||||
reloadIM();
|
reloadIM();
|
||||||
initStarChallengeStatus();
|
initStarChallengeStatus();
|
||||||
}
|
}
|
||||||
@ -1186,14 +1189,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
showBanner2();
|
showBanner2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void setRandomPkTimer(String timer){
|
|
||||||
if(timer==null){
|
public void setRandomPkTimer(String timer) {
|
||||||
|
if (timer == null) {
|
||||||
mRandomPkTimer.setVisibility(View.GONE);
|
mRandomPkTimer.setVisibility(View.GONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mRandomPkTimer.setVisibility(View.VISIBLE);
|
mRandomPkTimer.setVisibility(View.VISIBLE);
|
||||||
mRandomPkTimer.setText(timer);
|
mRandomPkTimer.setText(timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void showBanner2() {
|
private synchronized void showBanner2() {
|
||||||
if (mBannerList2 != null && mBanner2 != null) {
|
if (mBannerList2 != null && mBanner2 != null) {
|
||||||
btn_event2.setVisibility(View.VISIBLE);
|
btn_event2.setVisibility(View.VISIBLE);
|
||||||
@ -1794,7 +1799,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_l1.setOnClickListener(new View.OnClickListener() {
|
avatar_l1.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidL1 != null && !"" .equals(uidL1)) {
|
if (uidL1 != null && !"".equals(uidL1)) {
|
||||||
showUserDialog(uidL1);
|
showUserDialog(uidL1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1802,7 +1807,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_l2.setOnClickListener(new View.OnClickListener() {
|
avatar_l2.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidL2 != null && !"" .equals(uidL2)) {
|
if (uidL2 != null && !"".equals(uidL2)) {
|
||||||
showUserDialog(uidL2);
|
showUserDialog(uidL2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1810,7 +1815,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_l3.setOnClickListener(new View.OnClickListener() {
|
avatar_l3.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidL3 != null && !"" .equals(uidL3)) {
|
if (uidL3 != null && !"".equals(uidL3)) {
|
||||||
showUserDialog(uidL3);
|
showUserDialog(uidL3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1818,7 +1823,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_r1.setOnClickListener(new View.OnClickListener() {
|
avatar_r1.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidR1 != null && !"" .equals(uidR1)) {
|
if (uidR1 != null && !"".equals(uidR1)) {
|
||||||
showUserDialog(uidR1);
|
showUserDialog(uidR1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1826,7 +1831,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_r2.setOnClickListener(new View.OnClickListener() {
|
avatar_r2.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidR2 != null && !"" .equals(uidR2)) {
|
if (uidR2 != null && !"".equals(uidR2)) {
|
||||||
showUserDialog(uidR2);
|
showUserDialog(uidR2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1834,7 +1839,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
avatar_r3.setOnClickListener(new View.OnClickListener() {
|
avatar_r3.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (uidR3 != null && !"" .equals(uidR3)) {
|
if (uidR3 != null && !"".equals(uidR3)) {
|
||||||
showUserDialog(uidR3);
|
showUserDialog(uidR3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3031,7 +3036,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
if ("1" .equals(info[0])) {
|
if ("1".equals(info[0])) {
|
||||||
ft_hot_add.setVisibility(View.VISIBLE);
|
ft_hot_add.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
ft_hot_add.setVisibility(View.GONE);
|
ft_hot_add.setVisibility(View.GONE);
|
||||||
@ -3046,7 +3051,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
*/
|
*/
|
||||||
public static void getIsHot(String isUseHotCard) {
|
public static void getIsHot(String isUseHotCard) {
|
||||||
ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
|
ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
|
||||||
if ("1" .equals(isUseHotCard)) {
|
if ("1".equals(isUseHotCard)) {
|
||||||
ft_hot_add.setVisibility(View.VISIBLE);
|
ft_hot_add.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
ft_hot_add.setVisibility(View.GONE);
|
ft_hot_add.setVisibility(View.GONE);
|
||||||
@ -3344,7 +3349,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
} else if (bean.getActivityId() == 0) {
|
} else if (bean.getActivityId() == 0) {
|
||||||
openWebDialog(bean.getLink());
|
openWebDialog(bean.getLink());
|
||||||
} else {
|
} else {
|
||||||
LiveGameDialogFragment fragment = new LiveGameDialogFragment("1" .equals(bean.getShow_type()));
|
LiveGameDialogFragment fragment = new LiveGameDialogFragment("1".equals(bean.getShow_type()));
|
||||||
fragment.setActivityId(bean.getActivityId());
|
fragment.setActivityId(bean.getActivityId());
|
||||||
fragment.setRoomId(mLiveUid);
|
fragment.setRoomId(mLiveUid);
|
||||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
||||||
@ -3395,7 +3400,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
nowTime = time;
|
nowTime = time;
|
||||||
tv_trickery_time.setText("" + nowTime);
|
tv_trickery_time.setText("" + nowTime);
|
||||||
openType = 0;
|
openType = 0;
|
||||||
if ("1" .equals(msgtype)) {
|
if ("1".equals(msgtype)) {
|
||||||
nums = jsonObject.getString("nums");
|
nums = jsonObject.getString("nums");
|
||||||
prankid = jsonObject.getString("prankid");
|
prankid = jsonObject.getString("prankid");
|
||||||
content = jsonObject.getString("content");
|
content = jsonObject.getString("content");
|
||||||
@ -3559,21 +3564,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onUpdata(String str) {
|
public void onUpdata(String str) {
|
||||||
if ("svga_new_user_gif" .equals(str)) {
|
if ("svga_new_user_gif".equals(str)) {
|
||||||
if (fastMsgRecyclerView == null) return;
|
if (fastMsgRecyclerView == null) return;
|
||||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||||
fastMsgRecyclerView.getLayoutParams();
|
fastMsgRecyclerView.getLayoutParams();
|
||||||
params1.rightMargin = DeviceUtils.getScreenWidth((Activity) mContext) / 3;
|
params1.rightMargin = DeviceUtils.getScreenWidth((Activity) mContext) / 3;
|
||||||
fastMsgRecyclerView.setLayoutParams(params1);
|
fastMsgRecyclerView.setLayoutParams(params1);
|
||||||
} else if ("stop_svga_new_user_gif" .equals(str)) {
|
} else if ("stop_svga_new_user_gif".equals(str)) {
|
||||||
if (fastMsgRecyclerView == null) return;
|
if (fastMsgRecyclerView == null) return;
|
||||||
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
RelativeLayout.LayoutParams params1 = (RelativeLayout.LayoutParams)
|
||||||
fastMsgRecyclerView.getLayoutParams();
|
fastMsgRecyclerView.getLayoutParams();
|
||||||
params1.rightMargin = 0;
|
params1.rightMargin = 0;
|
||||||
fastMsgRecyclerView.setLayoutParams(params1);
|
fastMsgRecyclerView.setLayoutParams(params1);
|
||||||
} else if ("showBanner" .equals(str)) {
|
} else if ("showBanner".equals(str)) {
|
||||||
showBanner3(bean1);
|
showBanner3(bean1);
|
||||||
} else if ("stop_svga_new_user_double" .equals(str) && mBannerList3.size() > 2) {
|
} else if ("stop_svga_new_user_double".equals(str) && mBannerList3.size() > 2) {
|
||||||
|
|
||||||
mBannerList3.get(2).setLink("1");
|
mBannerList3.get(2).setLink("1");
|
||||||
mBanner3.update(mBannerList3);
|
mBanner3.update(mBannerList3);
|
||||||
@ -3584,7 +3589,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("stop_svga_new_user_follow" .equals(str) && mBannerList3.size() > 1) {
|
} else if ("stop_svga_new_user_follow".equals(str) && mBannerList3.size() > 1) {
|
||||||
mBannerList3.get(1).setLink("1");
|
mBannerList3.get(1).setLink("1");
|
||||||
|
|
||||||
mBanner3.update(mBannerList3);
|
mBanner3.update(mBannerList3);
|
||||||
@ -3595,7 +3600,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("stop_new_user_gif" .equals(str) && mBannerList3.size() > 0) {
|
} else if ("stop_new_user_gif".equals(str) && mBannerList3.size() > 0) {
|
||||||
IMLoginManager.get(mContext).setNewUserGif(false);
|
IMLoginManager.get(mContext).setNewUserGif(false);
|
||||||
mBannerList3.get(0).setLink("1");
|
mBannerList3.get(0).setLink("1");
|
||||||
mBanner3.update(mBannerList3);
|
mBanner3.update(mBannerList3);
|
||||||
@ -3783,7 +3788,69 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
case PK_TWO_END:
|
case PK_TWO_END:
|
||||||
closePkTwo();
|
closePkTwo();
|
||||||
break;
|
break;
|
||||||
|
case CUSTOM_FULL_SERVICE_NOTIFY:
|
||||||
|
customFullServiceNotify(event.getCustomFullServiceNotifyEvent());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全服通知
|
||||||
|
*
|
||||||
|
* @param customFullServiceNotifyEvent
|
||||||
|
*/
|
||||||
|
private void customFullServiceNotify(CustomFullServiceNotifyEvent customFullServiceNotifyEvent) {
|
||||||
|
if (customFullServiceNotifyEvent.getType() == 1) {
|
||||||
|
int duration = customFullServiceNotifyEvent.getDuration();
|
||||||
|
int handlerDuration = 0;
|
||||||
|
if (duration > 2) {
|
||||||
|
inAlphaAnimation.setDuration(1000);
|
||||||
|
outAlphaAnimation.setDuration(1000);
|
||||||
|
handlerDuration = duration - 2;
|
||||||
|
} else {
|
||||||
|
inAlphaAnimation.setDuration(500);
|
||||||
|
outAlphaAnimation.setDuration(500);
|
||||||
|
handlerDuration = duration - 1;
|
||||||
|
}
|
||||||
|
customFullServiceNotify.startAnimation(inAlphaAnimation);
|
||||||
|
customFullServiceNotify.setVisibility(View.VISIBLE);
|
||||||
|
ImgLoader.display(mContext,customFullServiceNotifyEvent.getImg(),customFullServiceNotify);
|
||||||
|
customFullHandler.postDelayed(customFullRunnable, handlerDuration * 1000);
|
||||||
|
} else {//文字通知
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//渐出动画
|
||||||
|
private AlphaAnimation inAlphaAnimation = new AlphaAnimation(0, 1);
|
||||||
|
private AlphaAnimation outAlphaAnimation = new AlphaAnimation(1, 0);
|
||||||
|
private Handler customFullHandler = new Handler();
|
||||||
|
private Runnable customFullRunnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
customFullServiceNotify.startAnimation(outAlphaAnimation);
|
||||||
|
//这个地方为什么要做动画的监听呢,因为隐藏和显示不一样,
|
||||||
|
//必须在动画结束之后再隐藏你的控件,这样才不会显得很突兀
|
||||||
|
outAlphaAnimation.setAnimationListener(new Animation.AnimationListener() {
|
||||||
|
@Override
|
||||||
|
public void onAnimationStart(Animation animation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationEnd(Animation animation) {
|
||||||
|
customFullServiceNotify.setVisibility(View.GONE);
|
||||||
|
customFullHandler.removeCallbacks(customFullRunnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAnimationRepeat(Animation animation) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ import com.yunbao.common.bean.MsgModel;
|
|||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.custom.MyViewPager;
|
import com.yunbao.common.custom.MyViewPager;
|
||||||
|
import com.yunbao.common.event.CustomFullServiceNotifyEvent;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.event.LiveFloatEvent;
|
import com.yunbao.common.event.LiveFloatEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
@ -1738,4 +1739,5 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mLiveRoomViewHolder.endDRGif();
|
mLiveRoomViewHolder.endDRGif();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -634,8 +634,8 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/random_pk_info_btn_ing"
|
android:text="@string/random_pk_info_btn_ing"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:visibility="gone"
|
android:textSize="10sp"
|
||||||
android:textSize="10sp" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/goto_room_view"
|
android:id="@+id/goto_room_view"
|
||||||
@ -2296,9 +2296,16 @@
|
|||||||
android:id="@+id/dr_pk_end_gif"
|
android:id="@+id/dr_pk_end_gif"
|
||||||
android:layout_width="140dp"
|
android:layout_width="140dp"
|
||||||
android:layout_height="140dp"
|
android:layout_height="140dp"
|
||||||
android:layout_marginTop="160dp"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_centerVertical="false"
|
android:layout_centerVertical="false"
|
||||||
|
android:layout_marginTop="160dp"
|
||||||
android:src="@mipmap/drpkend"
|
android:src="@mipmap/drpkend"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/custom_full_service_notify"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="110dp"
|
||||||
|
android:visibility="gone" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user