diff --git a/common/src/main/res/layout/dialog_live_mic_invite.xml b/common/src/main/res/layout/dialog_live_mic_invite.xml new file mode 100644 index 000000000..8da222dd4 --- /dev/null +++ b/common/src/main/res/layout/dialog_live_mic_invite.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index 2d8bca680..9b6020c81 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -539,12 +539,19 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { } }); } else if ("inviteMic".equals(str)) { - DialogUitl.showSimpleDialog(mContext, "主播邀請您進行語音連麥", new DialogUitl.SimpleCallback() { - @Override - public void onConfirmClick(Dialog dialog, String content) { - UsertoRY(); - } - }); + DialogUitl.Builder builder = new DialogUitl.Builder(mContext) + .setContent("邀請您進行語音連麥") + .setTitle(mLiveBean.getUserNiceName()) + .setConfrimString("接受") + .setCancelString("拒絕") + .setView(R.layout.dialog_live_mic_invite) + .setClickCallback(new DialogUitl.SimpleCallback() { + @Override + public void onConfirmClick(Dialog dialog, String content) { + UsertoRY(); + } + }); + builder.build().show(); } else if ("endMic".equals(str)) { if (rcrtcRoom != null) { diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomPlayViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomPlayViewHolder.java index 55a6412e4..85d216c23 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomPlayViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomPlayViewHolder.java @@ -3,6 +3,7 @@ package com.yunbao.live.views; import android.content.Context; import android.view.ViewGroup; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.live.interfaces.ILiveLinkMicViewHolder; @@ -11,6 +12,7 @@ import com.yunbao.live.interfaces.ILiveLinkMicViewHolder; */ public abstract class LiveRoomPlayViewHolder extends AbsViewHolder implements ILiveLinkMicViewHolder { + protected LiveBean mLiveBean; public LiveRoomPlayViewHolder(Context context, ViewGroup parentView) { super(context, parentView); @@ -41,4 +43,8 @@ public abstract class LiveRoomPlayViewHolder extends AbsViewHolder implements IL public abstract void setPkEndview(); public abstract void setLiveBeanLandscape(int landscape); + + public void setLiveBean(LiveBean data) { + this.mLiveBean = data; + } } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 995fdaca3..f7e1ad746 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -261,6 +261,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack, 400, 600); //ImageLoadUtils.loadUrlToBlur(mContext,mLiveBean.getAvatar(),400,600,liveBack); mask.setVisibility(View.VISIBLE); + mLivePlayViewHolder.setLiveBean(data); mLivePlayViewHolder.setCover(data.getThumb()); mLivePlayViewHolder.play(data.getPull()); mLiveRoomViewHolder.resetView();