观众观播notify-push1 push2 push3
This commit is contained in:
parent
7f2136320d
commit
13646d64c7
@ -282,6 +282,8 @@ public class Constants {
|
||||
|
||||
public static final String SOCKET_LIVE_ANCHOR_PK_DIALOG="GuildCompetitionNotice";//公会赛弹窗
|
||||
|
||||
public static final String SOCKET_SEND_NEW_TASK_PUSH="SendNewTaskPush";//直播间-新用户完成任务push
|
||||
|
||||
//视频举报获取位置
|
||||
public static int xIndex = 0;
|
||||
public static int yindex = 0;
|
||||
|
@ -113,10 +113,40 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
private String giftWallLightenNumber;
|
||||
@SerializedName("gift_wall_lighten_total")
|
||||
private String giftWallLightenTotal;
|
||||
|
||||
@SerializedName("connection_info")
|
||||
private LivePkMicModel connectionInfo;
|
||||
|
||||
@SerializedName("is_first_entry")
|
||||
private String isFirstEntry;
|
||||
@SerializedName("s_new_user")
|
||||
private String isNewUser;
|
||||
@SerializedName("is_com_all")
|
||||
private String isComAll;
|
||||
|
||||
public String getIsComAll() {
|
||||
return isComAll;
|
||||
}
|
||||
|
||||
public void setIsComAll(String isComAll) {
|
||||
this.isComAll = isComAll;
|
||||
}
|
||||
|
||||
public String getIsFirstEntry() {
|
||||
return isFirstEntry;
|
||||
}
|
||||
|
||||
public void setIsFirstEntry(String isFirstEntry) {
|
||||
this.isFirstEntry = isFirstEntry;
|
||||
}
|
||||
|
||||
public String getIsNewUser() {
|
||||
return isNewUser;
|
||||
}
|
||||
|
||||
public void setIsNewUser(String isNewUser) {
|
||||
this.isNewUser = isNewUser;
|
||||
}
|
||||
|
||||
public LivePkMicModel getConnectionInfo() {
|
||||
return connectionInfo;
|
||||
}
|
||||
|
@ -1580,6 +1580,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
manager.setSudName(event.getAvatar(), event.getCreateSudRoomModel());
|
||||
}
|
||||
break;
|
||||
case LIVE_AUTHOR_NEW_TASK_PUSH:
|
||||
if (manager != null) {
|
||||
manager.setNewTaskPush(event.getUid(),event.getHrefUrl());
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,7 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
public String mStream;
|
||||
public String mLiveUid, giftId;
|
||||
public SudGameDateModel createSudRoomModel;
|
||||
private String hrefUrl;
|
||||
|
||||
public SudGameDateModel getCreateSudRoomModel() {
|
||||
return createSudRoomModel;
|
||||
@ -114,6 +115,15 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getHrefUrl() {
|
||||
return hrefUrl;
|
||||
}
|
||||
|
||||
public LiveAudienceEvent setHrefUrl(String url) {
|
||||
hrefUrl = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getIsContactGift() {
|
||||
return isContactGift;
|
||||
}
|
||||
@ -491,7 +501,8 @@ public class LiveAudienceEvent extends BaseModel {
|
||||
PK_RANK_START(76, "PK排位赛开始"),
|
||||
GuardSpecialEffect(77, "PK排位赛开始"),
|
||||
LIVE_DIALOG_ANCHOR_TIPS(78, "主播公会赛tips"),
|
||||
LIVE_REMOVE_LIVEUID(79, "主播退出多人PK");
|
||||
LIVE_REMOVE_LIVEUID(79, "主播退出多人PK"),
|
||||
LIVE_AUTHOR_NEW_TASK_PUSH(80, "新人任务完成");
|
||||
|
||||
private int type;
|
||||
private String name;
|
||||
|
@ -798,6 +798,10 @@ public class SocketSwClient {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIVE_DIALOG_ANCHOR_TIPS)
|
||||
.setObject(WordUtil.isNewZh() ? item.getString("text") : item.getString("text_en")));
|
||||
case Constants.SOCKET_SEND_NEW_TASK_PUSH:
|
||||
item = map.getJSONObject("ct");
|
||||
Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.LIVE_AUTHOR_NEW_TASK_PUSH).setUid(item.getString("uid")).setHrefUrl(item.getString("href")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.views;
|
||||
|
||||
import static com.yunbao.live.bean.LiveChatBean.RECOMMEND_CARD_NOTIFY;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
@ -27,6 +28,7 @@ import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationSet;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.TranslateAnimation;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
@ -56,12 +58,9 @@ import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||
import com.bumptech.glide.request.RequestListener;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.Target;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.gson.Gson;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lzy.okgo.model.Progress;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.BannerConfig;
|
||||
@ -71,8 +70,8 @@ import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.PrankProgressBean;
|
||||
import com.yunbao.common.fragment.GiftWallMainTab1Fragment;
|
||||
import com.yunbao.common.utils.DebugUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
@ -89,7 +88,6 @@ import com.yunbao.common.bean.GuardUserModel;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
@ -133,12 +131,10 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.manager.RandomPkManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
@ -164,9 +160,7 @@ import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveSwAnchorActivity;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
import com.yunbao.live.adapter.ComboAdapter;
|
||||
import com.yunbao.live.adapter.LiveChatAdapter;
|
||||
import com.yunbao.live.adapter.LiveNewWishListAdapter;
|
||||
import com.yunbao.live.adapter.LiveRoomFastMessageRecyclerViewAdapter;
|
||||
import com.yunbao.live.adapter.LiveUserAdapter;
|
||||
import com.yunbao.live.adapter.PrankAdapter;
|
||||
@ -179,20 +173,17 @@ import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
import com.yunbao.live.bean.LiveWishlistBean;
|
||||
import com.yunbao.live.bean.NewAllServerNotifyGuardEvent;
|
||||
import com.yunbao.live.bean.WishlistItemModel;
|
||||
import com.yunbao.live.custom.LiveLightView;
|
||||
import com.yunbao.live.custom.RightGradual;
|
||||
import com.yunbao.live.dialog.DragonSendMoneyListPopup;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.dialog.LiveContactDetailsSendGiftDialog;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveGameDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LivePrankDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment4Audience;
|
||||
import com.yunbao.live.dialog.ReceiveRendPacketPopup;
|
||||
@ -206,8 +197,6 @@ import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
||||
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
||||
import com.yunbao.live.utils.LiveRoomVoteManager;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.live.utils.LoadDian9TuUtil;
|
||||
import com.yunbao.live.utils.ZeusKt;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -230,8 +219,6 @@ import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.UserInfo;
|
||||
|
||||
import com.bumptech.glide.load.resource.gif.GifDrawable;
|
||||
|
||||
import pl.droidsonroids.gif.GifImageView;
|
||||
|
||||
/**
|
||||
@ -472,12 +459,35 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private ProgressBar wish_progressbar;
|
||||
|
||||
private LinearLayout anTask;
|
||||
private boolean isComAll;
|
||||
private int mDp500;
|
||||
|
||||
//首次进入该直播间 关注弹窗
|
||||
private RelativeLayout notify_follow_layout;
|
||||
private ImageView notify_follow_coin;
|
||||
private TextView notify_follow_name;
|
||||
private ImageView follow_first_look;
|
||||
private ImageView close_first_look_follow;
|
||||
|
||||
//完成新人任务,领取专属豪礼
|
||||
private RelativeLayout new_task_gift_notify;
|
||||
private TextView new_task_gift_details;
|
||||
private ImageView close_task_receive_close;
|
||||
|
||||
//完成了任务
|
||||
private RelativeLayout new_task_gift_notify1;
|
||||
private TextView new_task_gift_details1;
|
||||
private ImageView close_task_receive_close1;
|
||||
|
||||
public LiveRoomViewHolder setGuardType(int guardType) {
|
||||
this.guardType = guardType;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setComAll(boolean isComAll){
|
||||
this.isComAll = isComAll;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_live_room;
|
||||
@ -931,10 +941,202 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mLiveGiftAnimPresenter.startGiftTipAnimatormSud();
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private Handler firstFollowLookHandler = new Handler();
|
||||
private Runnable firstFollowLookRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (notify_follow_layout != null) {
|
||||
animatorFollowFirstLook(false);
|
||||
firstFollowLookHandler.removeCallbacks(firstFollowLookRunnable);
|
||||
if(!nothingCheck || !isComAll){//没有任何操作
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showTaskDetailsNotify();
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private ObjectAnimator animator_follow_first_look;
|
||||
private boolean nothingCheck = false;
|
||||
|
||||
public void showFirstLookLiveFollowNotify() {
|
||||
notify_follow_layout.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LinearLayout.LayoutParams params1 = (LinearLayout.LayoutParams) notify_follow_layout.getLayoutParams();
|
||||
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(72);
|
||||
notify_follow_layout.setLayoutParams(params1);
|
||||
}
|
||||
});
|
||||
ImgLoader.displayAvatar(mContext, mAvatarUrl, notify_follow_coin);
|
||||
notify_follow_name.setText(mAnchorName);
|
||||
close_first_look_follow.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
nothingCheck = true;
|
||||
animatorFollowFirstLook(false);
|
||||
}
|
||||
});
|
||||
follow_first_look.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
nothingCheck = true;
|
||||
follow_first_look.setImageResource(R.mipmap.icon_live_room_followed);
|
||||
//關注
|
||||
follow();
|
||||
if (((LiveAudienceActivity) mContext).getCountDownTimer() != null) {
|
||||
((LiveAudienceActivity) mContext).getCountDownTimer().cancel();
|
||||
}
|
||||
animatorFollowFirstLook(false);
|
||||
firstFollowLookHandler.removeCallbacks(firstFollowLookRunnable);
|
||||
}
|
||||
});
|
||||
firstFollowLookHandler.removeCallbacks(firstFollowLookRunnable);
|
||||
firstFollowLookHandler.postDelayed(firstFollowLookRunnable, 7000);
|
||||
notify_follow_layout.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
animatorFollowFirstLook(true);
|
||||
}
|
||||
|
||||
public void animatorFollowFirstLook(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_follow_first_look = ObjectAnimator.ofFloat(notify_follow_layout, "translationX", mDp500, 0);
|
||||
animator_follow_first_look.setDuration(800);
|
||||
} else {
|
||||
animator_follow_first_look = ObjectAnimator.ofFloat(notify_follow_layout, "translationX", 0, mDp500);
|
||||
animator_follow_first_look.setDuration(800);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
notify_follow_layout.setVisibility(View.GONE);
|
||||
}
|
||||
},1000);
|
||||
}
|
||||
animator_follow_first_look.setInterpolator(new LinearInterpolator());
|
||||
animator_follow_first_look.start();
|
||||
}
|
||||
|
||||
private Handler firstTaskDetailsHandler = new Handler();
|
||||
private Runnable firstTaskDetailsRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (new_task_gift_notify != null) {
|
||||
animatorTaskDetails(false);
|
||||
firstTaskDetailsHandler.removeCallbacks(firstTaskDetailsRunnable);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private ObjectAnimator animator_first_task_details;
|
||||
|
||||
public void showTaskDetailsNotify() {
|
||||
new_task_gift_notify.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LinearLayout.LayoutParams params1 = (LinearLayout.LayoutParams) new_task_gift_notify.getLayoutParams();
|
||||
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(72);
|
||||
new_task_gift_notify.setLayoutParams(params1);
|
||||
}
|
||||
});
|
||||
close_task_receive_close.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
animatorTaskDetails(false);
|
||||
firstTaskDetailsHandler.removeCallbacks(firstTaskDetailsRunnable);
|
||||
}
|
||||
});
|
||||
firstTaskDetailsHandler.removeCallbacks(firstTaskDetailsRunnable);
|
||||
firstTaskDetailsHandler.postDelayed(firstTaskDetailsRunnable, 7000);
|
||||
new_task_gift_notify.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
animatorTaskDetails(true);
|
||||
}
|
||||
|
||||
public void animatorTaskDetails(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_first_task_details = ObjectAnimator.ofFloat(new_task_gift_notify, "translationX", mDp500, 0);
|
||||
animator_first_task_details.setDuration(800);
|
||||
} else {
|
||||
animator_first_task_details = ObjectAnimator.ofFloat(new_task_gift_notify, "translationX", 0, mDp500);
|
||||
animator_first_task_details.setDuration(800);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new_task_gift_notify.setVisibility(View.GONE);
|
||||
}
|
||||
},1000);
|
||||
}
|
||||
animator_first_task_details.setInterpolator(new LinearInterpolator());
|
||||
animator_first_task_details.start();
|
||||
}
|
||||
|
||||
|
||||
private Handler firstTaskDetailsHandler1 = new Handler();
|
||||
private Runnable firstTaskDetailsRunnable1 = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (new_task_gift_notify1 != null) {
|
||||
animatorTaskDetails1(false);
|
||||
firstTaskDetailsHandler1.removeCallbacks(firstTaskDetailsRunnable1);
|
||||
}
|
||||
}
|
||||
};
|
||||
private ObjectAnimator animator_first_task_details1;
|
||||
|
||||
public void showTaskDetailsNotify1(String url) {
|
||||
new_task_gift_notify1.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
LinearLayout.LayoutParams params1 = (LinearLayout.LayoutParams) new_task_gift_notify1.getLayoutParams();
|
||||
params1.width = mChatRecyclerView.getWidth() - DpUtil.dp2px(72);
|
||||
new_task_gift_notify1.setLayoutParams(params1);
|
||||
}
|
||||
});
|
||||
new_task_gift_details1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ZhuangBanActivity.forward(mContext, url, false, 1);
|
||||
}
|
||||
});
|
||||
close_task_receive_close1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
animatorTaskDetails1(false);
|
||||
firstTaskDetailsHandler1.removeCallbacks(firstTaskDetailsRunnable1);
|
||||
}
|
||||
});
|
||||
firstTaskDetailsHandler1.removeCallbacks(firstTaskDetailsRunnable1);
|
||||
firstTaskDetailsHandler1.postDelayed(firstTaskDetailsRunnable1, 7000);
|
||||
new_task_gift_notify1.setVisibility(View.VISIBLE);
|
||||
mDp500 = DpUtil.dp2px(-300);
|
||||
animatorTaskDetails1(true);
|
||||
}
|
||||
|
||||
public void animatorTaskDetails1(boolean isIn) {
|
||||
if (isIn) {
|
||||
animator_first_task_details1 = ObjectAnimator.ofFloat(new_task_gift_notify1, "translationX", mDp500, 0);
|
||||
animator_first_task_details1.setDuration(800);
|
||||
} else {
|
||||
animator_first_task_details1 = ObjectAnimator.ofFloat(new_task_gift_notify1, "translationX", 0, mDp500);
|
||||
animator_first_task_details1.setDuration(800);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new_task_gift_notify1.setVisibility(View.GONE);
|
||||
}
|
||||
},1000);
|
||||
}
|
||||
animator_first_task_details1.setInterpolator(new LinearInterpolator());
|
||||
animator_first_task_details1.start();
|
||||
}
|
||||
|
||||
|
||||
private View sudGameMin;
|
||||
|
||||
public void onShowHideEvent() {
|
||||
@ -948,9 +1150,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sudGameMin.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
HashMap<String, SVGAImageView> svgaImageViewHashMap = new HashMap<>();
|
||||
@ -1949,6 +2149,20 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
recycler_prank.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
|
||||
initPrankAdapter();
|
||||
|
||||
notify_follow_layout = findViewById(R.id.notify_follow_layout);
|
||||
notify_follow_coin = findViewById(R.id.notify_follow_coin);
|
||||
notify_follow_name = findViewById(R.id.notify_follow_name);
|
||||
follow_first_look = findViewById(R.id.follow_first_look);
|
||||
close_first_look_follow = findViewById(R.id.close_first_look_follow);
|
||||
|
||||
new_task_gift_notify = findViewById(R.id.new_task_gift_notify);
|
||||
new_task_gift_details = findViewById(R.id.new_task_gift_details);
|
||||
close_task_receive_close = findViewById(R.id.close_task_receive_close);
|
||||
|
||||
new_task_gift_notify1 = findViewById(R.id.new_task_gift_notify1);
|
||||
new_task_gift_details1 = findViewById(R.id.new_task_gift_details1);
|
||||
close_task_receive_close1 = findViewById(R.id.close_task_receive_close1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4071,6 +4285,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
isAttention = 1;
|
||||
EventBus.getDefault().post("stop_svga_new_user_follow1");
|
||||
}
|
||||
}
|
||||
@ -4620,6 +4835,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 首次进入直播间
|
||||
*/
|
||||
public void firstLookLiveNotifty() {
|
||||
if (mLiveRoomHandler != null) {
|
||||
mLiveRoomHandler.sendEmptyMessageAtTime(LiveRoomHandler.WHAT_FIRST_LOOK_LIVE, getNextTime(3000));
|
||||
}
|
||||
}
|
||||
|
||||
private long getNextTime(int time) {
|
||||
long now = SystemClock.uptimeMillis();
|
||||
if (time < 1000) {
|
||||
@ -4884,7 +5108,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
public void setShowTask(String url,boolean isShow){
|
||||
public void setShowTask(String url, boolean isShow) {
|
||||
anTask = findViewById(R.id.anTask);
|
||||
anTask.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -4892,7 +5116,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
ZhuangBanActivity.forward(mContext, url, false, 1);
|
||||
}
|
||||
});
|
||||
anTask.setVisibility(isShow?View.VISIBLE:View.GONE);
|
||||
anTask.setVisibility(isShow ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4941,7 +5165,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static class LiveRoomHandler extends Handler {
|
||||
|
||||
private LiveRoomViewHolder mLiveRoomViewHolder;
|
||||
@ -4951,6 +5174,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private static final int WHAT_ANCHOR_PAUSE = 4;//主播切后台
|
||||
private static final int WHAT_ANCHOR_LIGHT = 5;//主播飘心
|
||||
private static final int WHAT_ANCHOR_CHECK_LIVE = 6;//主播checkLive
|
||||
private static final int WHAT_FIRST_LOOK_LIVE = 7;//用户首次进入该直播间计时
|
||||
|
||||
public LiveRoomHandler(LiveRoomViewHolder liveRoomViewHolder) {
|
||||
mLiveRoomViewHolder = new WeakReference<>(liveRoomViewHolder).get();
|
||||
@ -4975,6 +5199,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
case WHAT_ANCHOR_CHECK_LIVE:
|
||||
mLiveRoomViewHolder.anchorCheckLive();
|
||||
break;
|
||||
case WHAT_FIRST_LOOK_LIVE:
|
||||
if (isAttention == 0) {
|
||||
mLiveRoomViewHolder.showFirstLookLiveFollowNotify();
|
||||
} else {
|
||||
mLiveRoomViewHolder.showTaskDetailsNotify();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -909,7 +909,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
//初始化整蠱列表
|
||||
mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2);
|
||||
|
||||
mLiveRoomViewHolder.setComAll(data.getEnterRoomInfo().getIsComAll().equals("1"));
|
||||
//检测是否是首次观看该直播间
|
||||
/*if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")&&data.getEnterRoomInfo().getIsNewUser().equals("1")&&data.getEnterRoomInfo().getIsattention().equals("0")){
|
||||
mLiveRoomViewHolder.firstLookLiveNotifty();
|
||||
}*/
|
||||
mLiveRoomViewHolder.firstLookLiveNotifty();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2312,6 +2317,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
public void setNewTaskPush(String uid,String url) {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
if(CommonAppConfig.getInstance().getUid().equals(uid)){
|
||||
mLiveRoomViewHolder.showTaskDetailsNotify1(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服喇叭
|
||||
*
|
||||
|
@ -91,7 +91,6 @@
|
||||
android:textSize="8sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
@ -3207,29 +3206,33 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:id="@+id/notify_follow_layout"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@mipmap/bg_live_room_notify_follow"
|
||||
android:layout_width="200dp"
|
||||
android:layout_width="match_parent"
|
||||
android:paddingStart="10dp"
|
||||
android:layout_height="41dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@mipmap/icon_live_room_follow_avatar" />
|
||||
|
||||
<ImageView
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/notify_follow_coin"
|
||||
android:layout_width="29dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginStart="0.5dp"
|
||||
app:riv_oval="true"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@mipmap/icon_live_room_follow_avatar" />
|
||||
|
||||
@ -3260,18 +3263,20 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/follow_first_look"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@mipmap/icon_live_room_follow" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:id="@+id/close_first_look_follow"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/icon_live_notify_close1" />
|
||||
</RelativeLayout>
|
||||
|
BIN
live/src/main/res/mipmap-xhdpi/icon_live_room_follow.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/icon_live_room_follow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
live/src/main/res/mipmap-xhdpi/icon_live_room_followed.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/icon_live_room_followed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
Loading…
Reference in New Issue
Block a user