新增H5网页跳转直播间并打开礼物栏选中礼物功能
This commit is contained in:
@@ -107,6 +107,7 @@ import com.yunbao.live.event.LinkMicTxAccEvent;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.http.ImHttpUtil;
|
||||
import com.yunbao.live.views.LiveRoomPlayViewHolder;
|
||||
import com.yunbao.live.views.LiveRoomViewHolder;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
import com.yunbao.share.ui.SharePopDialog;
|
||||
|
||||
@@ -393,9 +394,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mLiveTypeVal = 0;
|
||||
}
|
||||
mLiveType = liveType;
|
||||
String giftId=mLiveBean.getGiftId();
|
||||
String json = GsonUtils.toJson(data);
|
||||
mLiveBean = GsonUtils.fromJson(json, LiveBean.class);
|
||||
mLiveBean.setUserNiceName(data.getUserNicename());
|
||||
mLiveBean.setGiftId(giftId);
|
||||
mLiveUid = mLiveBean.getUid();
|
||||
mStream = mLiveBean.getStream();
|
||||
mAncherName = mLiveBean.getUserNiceName();
|
||||
@@ -729,6 +732,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (e.isLiveEnd()) {
|
||||
manager.removeLiveEnd();
|
||||
}
|
||||
if (LiveRoomViewHolder.mHandler != null) {
|
||||
LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
if (liveBean != null) {
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
||||
|
||||
@@ -57,4 +57,9 @@ public class GiftTitleAdapter extends RecyclerView.Adapter {
|
||||
index = -1;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setTitleIndex(int i) {
|
||||
index=i;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
Bus.getOff(this);
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void initView() {
|
||||
gitBackground = mRootView.findViewById(R.id.git_background2);
|
||||
@@ -204,19 +205,19 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
levelingLayout.setVisibility(View.VISIBLE);
|
||||
updateOverlayVisibility();
|
||||
blindBox.setOnTouchListener((v, event) -> {
|
||||
if(event.getAction()==MotionEvent.ACTION_UP) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
v.performClick();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
namingLayout.setOnTouchListener((v, event) -> {
|
||||
if(event.getAction()==MotionEvent.ACTION_UP) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
v.performClick();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
operateImage.setOnTouchListener((v, event) -> {
|
||||
if(event.getAction()==MotionEvent.ACTION_UP) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
v.performClick();
|
||||
}
|
||||
return true;
|
||||
@@ -274,7 +275,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
htmlUrl.append(CommonAppConfig.HOST)
|
||||
.append("/h5/info/index.html?uid=")
|
||||
.append("/h5/blindBoxInfo/index.html?uid=")
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken())
|
||||
@@ -419,6 +420,8 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
liveGiftList.getJSONObject(i).getString("name"),
|
||||
mStream, mLiveUid, mWishGiftId));
|
||||
transaction.commit();
|
||||
giftTitleAdapter.setTitleIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -811,7 +814,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
if (!TextUtils.isEmpty(liveGiftModel.getOperateImage())) {
|
||||
operateImage.setVisibility(View.VISIBLE);
|
||||
ImgLoader.display(getContext(), liveGiftModel.getOperateImage(), operateImage);
|
||||
}else {
|
||||
} else {
|
||||
operateImage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ 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.LiveGiftPopup;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
@@ -3941,6 +3942,17 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
voteManager.setCreateVoteModel(voteModel);
|
||||
}
|
||||
|
||||
public void openGiftDialog(String giftId) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.GIFT_POPUP)
|
||||
.setmLiveUid(mLiveUid)
|
||||
.setmStream(mStream)
|
||||
.setPk(false)
|
||||
.setLiveGuardInfo(null)
|
||||
.setmWishGiftId(giftId)
|
||||
.setUname("0"));//setUname==by
|
||||
}
|
||||
|
||||
|
||||
private static class LiveRoomHandler extends Handler {
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.RandomUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.weight.LiveFloatView;
|
||||
@@ -284,7 +285,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
Log.e("ImgLoader1", data.getAvatar());
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
mLiveRyLinkMicPkPresenter.clearData();
|
||||
@@ -447,6 +447,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
mLiveRoomViewHolder.setUserList(data.getEnterRoomInfo().getUserlists());
|
||||
//设置靓号
|
||||
mLiveRoomViewHolder.setAnchorGoodNumber(data.getLiveInfo().getGoodnum());
|
||||
if(!StringUtil.isEmpty(mLiveBean.getGiftId())){
|
||||
mLiveRoomViewHolder.openGiftDialog(mLiveBean.getGiftId());
|
||||
}
|
||||
List<BannerBean> bannerBeans = new ArrayList<>();
|
||||
//心愿单
|
||||
// if (data.getWishList().getWishList().size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user