1、開通守護-使用優惠券

2、开通贵族,在当前直播间有围观按钮问题
This commit is contained in:
Martin 2024-07-09 13:08:33 +08:00
parent 3dcc801331
commit 769f527565
8 changed files with 30 additions and 19 deletions

View File

@ -57,7 +57,6 @@ public class GuardBuyCouponTipsDialog {
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() { dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
simpleCallback.onCancel();
dialog.dismiss(); dialog.dismiss();
} }
}); });

View File

@ -27,6 +27,7 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.utils.BitmapUtil; import com.yunbao.common.utils.BitmapUtil;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.utils.SVGAViewUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -56,6 +57,8 @@ public class NobleNoticeView extends FrameLayout {
private HorizontalScrollView contextLayout; private HorizontalScrollView contextLayout;
private RelativeLayout scrollLayout; private RelativeLayout scrollLayout;
private ImageView nobleIcon; private ImageView nobleIcon;
private String anchorUid;
private String mLiveId;
public NobleNoticeView(@NonNull Context context) { public NobleNoticeView(@NonNull Context context) {
super(context); super(context);
@ -97,9 +100,11 @@ public class NobleNoticeView extends FrameLayout {
}); });
} }
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) { public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid,String mLiveId) {
this.uhead = uHead; this.uhead = uHead;
this.anchorNicknameStr = anchorNicknameStr.trim(); this.anchorNicknameStr = anchorNicknameStr.trim();
this.anchorUid = anchorUid;
this.mLiveId = mLiveId;
userName.setText(userNameStr); userName.setText(userNameStr);
anchorNickname.setText(anchorNicknameStr.trim()); anchorNickname.setText(anchorNicknameStr.trim());
if (TextUtils.isEmpty(anchorNicknameStr.trim())) { if (TextUtils.isEmpty(anchorNicknameStr.trim())) {
@ -112,6 +117,10 @@ public class NobleNoticeView extends FrameLayout {
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE); findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
openNoble.setText(mContext.getString(R.string.open_noble)); openNoble.setText(mContext.getString(R.string.open_noble));
} }
if(anchorUid.equals(mLiveId)){
L.eSw("showBuyVipMessage:"+anchorUid+"__"+mLiveId);
gotoRoomView.setVisibility(GONE);
}
return this; return this;
} }
@ -352,13 +361,15 @@ public class NobleNoticeView extends FrameLayout {
gotoRoomView.setLayoutParams(layoutParams); gotoRoomView.setLayoutParams(layoutParams);
contextLayout.setLayoutParams(contextLayoutParams); contextLayout.setLayoutParams(contextLayoutParams);
if (!TextUtils.isEmpty(anchorNicknameStr)) { if (!TextUtils.isEmpty(anchorNicknameStr)) {
gotoRoomView.setVisibility(VISIBLE); if(mLiveId.equals(anchorUid)){
gotoRoomView.setVisibility(GONE);
}else{
gotoRoomView.setVisibility(VISIBLE);
}
findViewById(R.id.in).setVisibility(VISIBLE); findViewById(R.id.in).setVisibility(VISIBLE);
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE); findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
} }
contextLayout.setVisibility(VISIBLE); contextLayout.setVisibility(VISIBLE);
}); });
} }

View File

@ -2,13 +2,13 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="310dp" android:layout_width="310dp"
android:layout_height="220dp" android:layout_height="250dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="200dp" android:layout_height="230dp"
android:background="@drawable/guard_buy_tips_bg"> android:background="@drawable/guard_buy_tips_bg">
<ImageView <ImageView
@ -40,7 +40,7 @@
android:layout_below="@+id/title" android:layout_below="@+id/title"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_marginTop="30dp" android:layout_marginTop="10dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:gravity="center" android:gravity="center"
android:letterSpacing="0.1" android:letterSpacing="0.1"

View File

@ -1502,5 +1502,5 @@
<string name="prank_complete">完成*1</string> <string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string> <string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string> <string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">取消</string> <string name="live_guard_buy_coupon_tips_cancel">不使用</string>
</resources> </resources>

View File

@ -1501,5 +1501,5 @@
<string name="prank_complete">完成*1</string> <string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string> <string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string> <string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">取消</string> <string name="live_guard_buy_coupon_tips_cancel">不使用</string>
</resources> </resources>

View File

@ -1498,6 +1498,6 @@
<string name="prank_complete">完成*1</string> <string name="prank_complete">完成*1</string>
<string name="pking_over">主播正在PK稍後再試</string> <string name="pking_over">主播正在PK稍後再試</string>
<string name="live_guard_buy_coupon_tips_use">使用</string> <string name="live_guard_buy_coupon_tips_use">使用</string>
<string name="live_guard_buy_coupon_tips_cancel">取消</string> <string name="live_guard_buy_coupon_tips_cancel">不使用</string>
</resources> </resources>

View File

@ -1507,5 +1507,5 @@ Limited ride And limited avatar frame</string>
<string name="pking_over">The anchor is in PK, please try again later</string> <string name="pking_over">The anchor is in PK, please try again later</string>
<string name="prank_complete">once</string> <string name="prank_complete">once</string>
<string name="live_guard_buy_coupon_tips_use">Use</string> <string name="live_guard_buy_coupon_tips_use">Use</string>
<string name="live_guard_buy_coupon_tips_cancel">Cancel</string> <string name="live_guard_buy_coupon_tips_cancel">Not use</string>
</resources> </resources>

View File

@ -4394,29 +4394,30 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param bean * @param bean
*/ */
public void showBuyVipMessage(LiveReceiveGiftBean bean) { public void showBuyVipMessage(LiveReceiveGiftBean bean) {
L.eSw("showBuyVipMessage:"+bean.getRoomnum()+"__"+mLiveUid);
noble.setVisibility(View.VISIBLE); noble.setVisibility(View.VISIBLE);
switch (bean.getNobilityid()) { switch (bean.getNobilityid()) {
case "1": case "1":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.BARON).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.BARON).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "2": case "2":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.VISCOUNT).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.VISCOUNT).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "3": case "3":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.MARQUIS).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.MARQUIS).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "4": case "4":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.DUKE).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.DUKE).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "5": case "5":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.KING).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.KING).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "6": case "6":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.EMPEROR).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.EMPEROR).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
case "7": case "7":
noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum()).setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR).setCallBack(() -> gotoLive(bean.getRoomnum())); noble.setRootView(bean.getUhead(), bean.getUname(), bean.getAncherName(), bean.getRoomnum(),mLiveUid).setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR).setCallBack(() -> gotoLive(bean.getRoomnum()));
break; break;
} }
} }