移除主播直播间观众列表与守护列表的购买界面

This commit is contained in:
zlzw 2022-11-03 17:28:50 +08:00
parent cf08f8197b
commit 50b598d8a1
6 changed files with 36 additions and 12 deletions

View File

@ -1200,7 +1200,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
/**
* 守护列表弹窗
*/
public void openNewGuardListWindow() {
public void openNewGuardListWindow(boolean showBuyView) {
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
@ -1214,6 +1214,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
Bundle bundle = new Bundle();
bundle.putString(Constants.LIVE_UID, mLiveUid);
bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
bundle.putBoolean("showBuyView",!showBuyView);
fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
}
@ -1245,7 +1246,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
/**
* 打开观看列表弹窗
*/
public void openUserMoreListWindow(int i, boolean isOnly, boolean noble) {
public void openUserMoreListWindow(int i, boolean isOnly, boolean noble,boolean showBuyView) {
if (outRankHideFirst) {
//获取隐身的用户的ID
@ -1263,6 +1264,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
bundle.putBoolean("only", isOnly);
bundle.putBoolean("noble", noble);
bundle.putString("outRankHide", GsonUtils.toJson(outRankHide));
bundle.putBoolean("showBuyView",!showBuyView);
fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "LiveUserMoreDialogFragment");
LiveUserMoreDialogFragment.activity = (LiveActivity) mContext;
@ -1283,6 +1285,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
bundle.putString("By", i + "");
bundle.putBoolean("only", isOnly);
bundle.putBoolean("noble", noble);
bundle.putBoolean("showBuyView",!showBuyView);
bundle.putString("outRankHide", GsonUtils.toJson(outRankHide));
fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "LiveUserMoreDialogFragment");

View File

@ -758,7 +758,7 @@ public class LiveAudienceActivity extends LiveActivity {
liveFansFragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
break;
case GUARD:
openNewGuardListWindow();
openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
break;
case LIVE_WKS://周星榜
String weeklyStarUrl = CommonAppConfig.HOST + "/h5/activity/weekStar/index.html?&uid="

View File

@ -34,6 +34,7 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.adapter.GuardRightAdapter;
import com.yunbao.live.adapter.LiveNewGuardBuyItemsAdapter;
import com.yunbao.live.bean.GuardBuyBean;
@ -81,8 +82,9 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
private LiveNewGuardBuyItemsAdapter buyItemsAdapter;
private GuardRightAdapter mGuardRightAdapter;
private boolean isEmpty;
private boolean isEmpty,showBuyView;
private ImageView mBack;
private RelativeLayout relativeLayout;
@Override
@ -135,6 +137,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
buy2 = mRootView.findViewById(R.id.buy2);
guard_tips = mRootView.findViewById(R.id.guard_textView2);
mBack = mRootView.findViewById(R.id.guard_back);
relativeLayout = mRootView.findViewById(R.id.guard_relativeLayout);
//iconCover.setImageResource(R.drawable.guardian_img_wings);
@ -166,6 +169,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
mAncherName = bundle.getString(Constants.LIVE_ANCHER_NAME);
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
mUserIcon = bundle.getString(Constants.USER_ICON);
showBuyView = bundle.getBoolean("showBuyView",true);
String coinName = WordUtil.getString(R.string.diamond);
mCoinName = coinName;
isEmpty=bundle.getBoolean("guard",true);
@ -248,6 +252,9 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
anchorName.setText(title);
guard_tips.setText("守護日期截止到:"+ mLiveGuardInfo.getMyGuardEndTime());
}
if(!showBuyView){
relativeLayout.setVisibility(View.GONE);
}
}
@ -285,7 +292,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
}
private void gotoBack(){
dismiss();
((LiveActivity)mContext).openNewGuardListWindow();
((LiveActivity)mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
}
/**

View File

@ -7,6 +7,7 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -53,7 +54,9 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
private LiveGuardInfo mLiveGuardInfo;
private String mLiveUid;
private boolean mIsAnchor;//是否是主播
private boolean showBuyView;
private List<GuardUserBean> list=new ArrayList<>();
private RelativeLayout relativeLayout;
@Override
protected int getLayoutId() {
@ -93,6 +96,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
}
mIsAnchor = bundle.getBoolean(Constants.ANCHOR, false);
mLiveUid = bundle.getString(Constants.LIVE_UID);
showBuyView = bundle.getBoolean("showBuyView",true);
guardIcon = mRootView.findViewById(R.id.guard_imageView);
mRootLayout = mRootView.findViewById(R.id.guard_constraintLayout);
mBtnBuy = mRootView.findViewById(R.id.guard_btn_buy);
@ -105,6 +109,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
userLayout = mRootView.findViewById(R.id.guard_linearLayout);
tip1 = mRootView.findViewById(R.id.guard_tip1);
tip2 = mRootView.findViewById(R.id.guard_tip2);
relativeLayout = mRootView.findViewById(R.id.guard_relativeLayout);
mBtnBuy.setOnClickListener(this);
mBtnBuy.setEnabled(true);
mBtnBuy.setText(R.string.guard_buy_2);
@ -163,6 +168,9 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
});
mRefreshView.setRecyclerViewAdapter(mGuardAdapter);
mGuardAdapter.notifyDataSetChanged();
if(!showBuyView){
relativeLayout.setVisibility(View.GONE);
}
}
@Override

View File

@ -35,6 +35,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.adapter.UserMoreInfoAdapter;
import com.yunbao.live.bean.LiveGuardInfo;
import com.yunbao.live.bean.LiveUserGiftBean;
@ -68,7 +69,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
private RelativeLayout bottom_msg;//底部信息的布局在榜单列表下不需要显示底部信息
private String Tips = "1";
private String type = "guanzhong";
private boolean isOnly, noble;
private boolean isOnly, noble,showBuyView;
ImageView no_more;
private List<String> outRankHide = new ArrayList<>();
@ -114,6 +115,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
stream = bundle.getString(Constants.STREAM);
isOnly = bundle.getBoolean("only", false);
noble = bundle.getBoolean("noble", false);
showBuyView = bundle.getBoolean("showBuyView",true);
String outRankHideString = bundle.getString("outRankHide");
outRankHide = GsonUtils.fromJson(outRankHideString, new TypeToken<List<String>>() {
}.getType());
@ -142,7 +144,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
((LiveActivity) mContext).openLuckGiftTip();
} else if (Tips.equals("2")) {
dismiss();
((LiveActivity) mContext).openNewGuardListWindow();
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
} else if (Tips.equals("3")) {
dismiss();
((LiveActivity) mContext).openFansWindow();
@ -417,6 +419,10 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
setTextColor(weekRank, audience_btn, guard_btn, fans_btn, gz_view, dayRank);
noMoreText.setVisibility(View.VISIBLE);
}
if(!showBuyView){
bottom_msg.setVisibility(View.GONE);
params.bottomMargin = DpUtil.dp2px(0);
}
mRefreshView.setLayoutParams(params);
}

View File

@ -1964,19 +1964,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//直播间 粉丝排行榜
openMedalRankWindow();
} else if (i == R.id.btn_guard) {
((LiveActivity) mContext).openNewGuardListWindow();
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
} else if (i == R.id.btn_red_pack) {
((LiveActivity) mContext).openRedPackListWindow();
} else if (i == R.id.btn_prize_pool_level) {
((LiveActivity) mContext).openPrizePoolWindow();
} else if (i == R.id.user_more) {
((LiveActivity) mContext).openUserMoreListWindow(1, false, false);
((LiveActivity) mContext).openUserMoreListWindow(1, false, false,mContext instanceof LiveRyAnchorActivity);
} else if (i == R.id.hot_btn) {
((LiveActivity) mContext).openUserMoreListWindow(1, false, false);
((LiveActivity) mContext).openUserMoreListWindow(1, false, false,mContext instanceof LiveRyAnchorActivity);
} else if (i == R.id.noble_seat) {
((LiveActivity) mContext).openUserMoreListWindow(1, false, true);
((LiveActivity) mContext).openUserMoreListWindow(1, false, true,mContext instanceof LiveRyAnchorActivity);
} else if (i == R.id.btn_close) {
close();
//小屏
@ -1986,7 +1986,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
((LiveActivity) mContext).openHotListWindow(1);
} else if (i == R.id.user_guard) {
// ((LiveActivity) mContext).openUserMoreListWindow(2, true);
((LiveActivity) mContext).openNewGuardListWindow();
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
}
if (i == R.id.lt_trickery) {
showTrickeryDialog();