修复PK显示问题:【是用户先进 主播后挂断会显示对方信息角标】
调整直播间游戏半屏UI 调整战令UI
This commit is contained in:
parent
aa62dda844
commit
47077a465a
@ -97,6 +97,15 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
private String rewardName;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("send_reward_type")
|
||||
private int sendRewardType;
|
||||
@SerializedName("send_gift_type")
|
||||
private int sendGiftType;
|
||||
@SerializedName("send_reward_needcoin")
|
||||
private String sendRewardNeedcoin;
|
||||
@SerializedName("send_reward_restrict_time")
|
||||
private String sendRewardRestrictTime;
|
||||
|
||||
private int lock;
|
||||
private int received;
|
||||
|
||||
@ -159,6 +168,38 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
this.received = received;
|
||||
}
|
||||
|
||||
public int getSendRewardType() {
|
||||
return sendRewardType;
|
||||
}
|
||||
|
||||
public void setSendRewardType(int sendRewardType) {
|
||||
this.sendRewardType = sendRewardType;
|
||||
}
|
||||
|
||||
public int getSendGiftType() {
|
||||
return sendGiftType;
|
||||
}
|
||||
|
||||
public void setSendGiftType(int sendGiftType) {
|
||||
this.sendGiftType = sendGiftType;
|
||||
}
|
||||
|
||||
public String getSendRewardNeedcoin() {
|
||||
return sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public void setSendRewardNeedcoin(String sendRewardNeedcoin) {
|
||||
this.sendRewardNeedcoin = sendRewardNeedcoin;
|
||||
}
|
||||
|
||||
public String getSendRewardRestrictTime() {
|
||||
return sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
public void setSendRewardRestrictTime(String sendRewardRestrictTime) {
|
||||
this.sendRewardRestrictTime = sendRewardRestrictTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LiveBattlePassReward{" +
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.common.dialog;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
@ -275,6 +276,29 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
.asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show();
|
||||
}
|
||||
});
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
}
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
}
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
}
|
||||
}
|
||||
|
||||
private int getDefColor() {
|
||||
return Color.WHITE;
|
||||
}
|
||||
|
||||
private int getYellowColor() {
|
||||
return Color.YELLOW;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -293,6 +317,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSudGameListEvent(SudGameListEvent event) {
|
||||
interactionID = event.getInteractionID();
|
||||
if (interactionID == 0) {
|
||||
gameTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
gameTitle.setTextColor(getDefColor());
|
||||
}
|
||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||
gameTitle.setText(event.getTitle());
|
||||
} else {
|
||||
@ -325,7 +354,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
} else {
|
||||
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
||||
}
|
||||
|
||||
if (mSill.equals("0,0,0")) {
|
||||
sillTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
sillTitle.setTextColor(getDefColor());
|
||||
}
|
||||
|
||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
||||
animator.setDuration(500);
|
||||
@ -344,6 +377,11 @@ public class SudGameListPopup extends BottomPopupView {
|
||||
animator.setInterpolator(new LinearInterpolator());
|
||||
animator.start();
|
||||
mRefreshView.initData();
|
||||
if ("0".equals(roomHolderType)) {
|
||||
houseOwnerTitle.setTextColor(getYellowColor());
|
||||
} else {
|
||||
houseOwnerTitle.setTextColor(getDefColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,9 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
</item>-->
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="fill_vertical|fill_horizontal"
|
||||
android:src="@drawable/background_order_dialog_out_layout" />
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="10dp"
|
||||
android:color="#CCBEF3" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="3dp"
|
||||
@ -11,12 +19,15 @@
|
||||
android:right="4dp"
|
||||
android:top="4dp">
|
||||
<shape>
|
||||
|
||||
<solid android:color="#F5F5FF" />
|
||||
|
||||
<corners android:radius="10dp" />
|
||||
|
||||
<stroke
|
||||
android:width="3dp"
|
||||
android:color="#657FE4" />
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="90dp" />
|
||||
<gradient
|
||||
android:endColor="#4B4B4B"
|
||||
android:startColor="#4B4B4B" />
|
||||
</shape>
|
@ -32,21 +32,21 @@
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:src="@mipmap/icon_sud_history_live" />
|
||||
android:src="@mipmap/icon_sud_history_live_new" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/min_game"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@mipmap/icon_min_game"
|
||||
android:src="@mipmap/icon_min_game_new"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_live_sud_game_back"
|
||||
android:background="@drawable/bg_live_sud_game_back_new2"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_exit"
|
||||
android:textColor="#FFFFFF"
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/icon_min_game_new.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_min_game_new.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -729,23 +729,38 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
Log.e("ry", "pkUid = " + pkUid + ", pkhead = " + pkhead + ", pkname = " + pkname + ", isLadders = " + isLadders);
|
||||
if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", mLiveUid + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
mLiveRoomViewHolder.initPkRank(isLadders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 4000);//3秒后执行Runnable中的run方法
|
||||
pr = new pkRunnable(pkUid, pkhead, pkname, isLadders);
|
||||
mHandler.postDelayed(pr, 4000);//3秒后执行Runnable中的run方法
|
||||
|
||||
}
|
||||
}
|
||||
public Handler mHandler = new Handler();
|
||||
public pkRunnable pr;
|
||||
|
||||
public class pkRunnable implements Runnable {
|
||||
private String pkUid;
|
||||
private String pkhead;
|
||||
private String pkname;
|
||||
private String isLadders;
|
||||
|
||||
public pkRunnable(String pkUid, String pkhead, String pkname, String isLadders) {
|
||||
this.pkUid = pkUid;
|
||||
this.pkhead = pkhead;
|
||||
this.pkname = pkname;
|
||||
this.isLadders = isLadders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", mLiveUid + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!mLiveUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
mLiveRoomViewHolder.initPkRank(isLadders);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 主播与主播PK 所有人收到断开连麦pk的回调
|
||||
@ -951,7 +966,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
}
|
||||
String[] data = new String[]{obj.getString("barragetoken")};
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents, obj.getIntValue("level_fans"));
|
||||
} else if (code==1001) {
|
||||
} else if (code == 1001) {
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
@ -1289,9 +1304,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
//粉絲團粉絲團
|
||||
//不是粉絲
|
||||
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
} else {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
|
||||
}
|
||||
bundle.putString("liveUid", mLiveUid);
|
||||
bundle.putString("anchorName", mAncherName);
|
||||
@ -1331,7 +1346,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("LiveUserMoreDialog", error);
|
||||
ToastUtil.show(WordUtil.isNewZh()?"抱歉!出錯了!":"i \\'m sorry! An error occurred");
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -1470,7 +1485,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
public void openLuckGiftTip() {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName+ "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&anchorUid=" + mLiveUid + "&anchorName=" + mAncherName + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
startActivity(new Intent(this, ZhuangBanActivity.class).putExtra("url", url).putExtra("title", ""));
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,12 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mStream = mLiveBean.getStream();
|
||||
mAncherName = mLiveBean.getUserNiceName();
|
||||
mAncherIcon = mLiveBean.getAvatar();
|
||||
if (pr != null) {
|
||||
mHandler.removeCallbacks(pr);
|
||||
pr = null;
|
||||
}
|
||||
manager.onAdd(mLiveBean, mLiveType, mLiveTypeVal, mLiveSDK);
|
||||
|
||||
//加载完页面后再后台静默下载礼物svga
|
||||
downloadAllGift();
|
||||
over();
|
||||
@ -824,7 +829,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (manager != null && !StringUtil.isEmpty(is_fans)) {
|
||||
if (is_fans.equals("-2")) {
|
||||
manager.setAttention(0);
|
||||
if (mLiveRoomViewHolder!=null){
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setFansGroup("0");
|
||||
}
|
||||
|
||||
|
@ -1237,6 +1237,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (LivePushTxViewHolder.mTRTCCloud != null || LivePushRyViewHolder.rtcRoom != null) {
|
||||
fans_btn.setVisibility(View.GONE);
|
||||
}
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
goto_room_view = (LinearLayout) findViewById(R.id.goto_room_view);
|
||||
goto_room_view.setVisibility(View.GONE);
|
||||
avatarOther = (ImageView) findViewById(R.id.avatarOther);
|
||||
@ -1817,6 +1818,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_ico);
|
||||
mGoodNumberIcon.setVisibility(View.GONE);
|
||||
mAnchorSay.setVisibility(View.INVISIBLE);
|
||||
showAnchorSayAndCallAnchor();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2488,7 +2490,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
|
||||
public void initRankPKInfo(String mLiveUid,String pkUid) {
|
||||
public void initRankPKInfo(String mLiveUid, String pkUid) {
|
||||
LiveNetManager.get(mContext)
|
||||
.getRandomPk(mLiveUid, pkUid, new com.yunbao.common.http.base.HttpCallback<PkRankBean>() {
|
||||
@Override
|
||||
@ -2843,12 +2845,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
Log.e("LiveRoomViewHolder", "closePkTwo: 隐藏PK信息" + goto_room_view.getVisibility());
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
lt_pk_line.setVisibility(View.GONE);
|
||||
pkHandler = false;
|
||||
pkUid = "";
|
||||
goto_room_view.setVisibility(View.GONE);
|
||||
livePKUserListBean = new LivePKUserListBean();
|
||||
mRedVal.setVisibility(View.GONE);
|
||||
mBlueVal.setVisibility(View.GONE);
|
||||
mPkRankTopIcon.setVisibility(View.GONE);
|
||||
showAnchorSayAndCallAnchor();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4916,7 +4920,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
hideAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case LIVE_PK_END:
|
||||
showAnchorSayAndCallAnchor();
|
||||
//showAnchorSayAndCallAnchor();
|
||||
break;
|
||||
case LIVE_FONT_SIZE:
|
||||
int fount = event.getNums();
|
||||
@ -5508,7 +5512,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void showAnchorSayAndCallAnchor() {
|
||||
isHinde = false;
|
||||
if (mAnchorSay.getVisibility() == View.GONE &&
|
||||
if (mAnchorSay.getVisibility() != View.VISIBLE &&
|
||||
sayModel != null && sayModel.getLivePreview() != null &&
|
||||
sayModel.getLivePreview().getIsShow() == 1
|
||||
) {
|
||||
|
@ -817,6 +817,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
Log.e("直播间接口调用排查", "onRemove---------------");
|
||||
LiveNetManager.get(mContext).cancelLive();
|
||||
liveHandler.removeCallbacks(sendFIm);
|
||||
pkInfo=null;
|
||||
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
||||
@ -1552,7 +1553,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
linkMicPkStartRunnable = () -> {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", liveID + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!liveID.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
if (!liveID.equals(CommonAppConfig.getInstance().getUid()) && pkInfo != null && pkInfo.containsKey("pkuid") && pkInfo.containsKey("pkuimg") && pkInfo.containsKey("pkuname")) {
|
||||
mLiveRoomViewHolder.setOtherInfo(mPkUid, mPkhead, mPkname);
|
||||
mLiveRoomViewHolder.initPkRank(mIsLadders);
|
||||
}
|
||||
@ -1620,7 +1621,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
public void onLinkMicPkEnd(String winUid) {
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkEnd(winUid);
|
||||
mLiveRoomViewHolder.setDelOtherInfo();
|
||||
//mLiveRoomViewHolder.setDelOtherInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
|
||||
private View floatRedPacket;
|
||||
|
||||
private View floatWarOrder;
|
||||
private View floatWarOrder;//战令浮窗
|
||||
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -49,7 +50,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
private List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList = new ArrayList<>();
|
||||
private int userLevel;
|
||||
private BattlePassUserInfoBean userType;
|
||||
private String quintessenceSpendMoney,enjoySpendMoney;
|
||||
private String quintessenceSpendMoney, enjoySpendMoney;
|
||||
private OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener;
|
||||
|
||||
public void setList(List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList) {
|
||||
@ -89,11 +90,11 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
}
|
||||
|
||||
public void setQuintessenceSpendMoney(String quintessenceSpendMoney) {
|
||||
this.quintessenceSpendMoney=quintessenceSpendMoney;
|
||||
this.quintessenceSpendMoney = quintessenceSpendMoney;
|
||||
}
|
||||
|
||||
public void setEnjoySpendMoney(String enjoySpendMoney) {
|
||||
this.enjoySpendMoney=enjoySpendMoney;
|
||||
this.enjoySpendMoney = enjoySpendMoney;
|
||||
}
|
||||
|
||||
public class VH extends RecyclerView.ViewHolder {
|
||||
@ -107,6 +108,10 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
ImageView tab1Received, tab2Received, tab3Received;
|
||||
TextView tab1Title, tab2Title, tab3Title;
|
||||
|
||||
LinearLayout tab1TopMoneySubscript, tab2TopMoneySubscript, tab3TopMoneySubscript;
|
||||
TextView tab1TopMoney, tab2TopMoney, tab3TopMoney;
|
||||
ImageView tab1TopMoneyIcon, tab2TopMoneyIcon, tab3TopMoneyIcon;
|
||||
|
||||
|
||||
Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward> data;
|
||||
|
||||
@ -137,6 +142,15 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
tab1Received = itemView.findViewById(R.id.tab_1_item_received);
|
||||
tab2Received = itemView.findViewById(R.id.tab_2_item_received);
|
||||
tab3Received = itemView.findViewById(R.id.tab_3_item_received);
|
||||
tab1TopMoneySubscript = itemView.findViewById(R.id.tab_1_top_money_layout);
|
||||
tab2TopMoneySubscript = itemView.findViewById(R.id.tab_2_top_money_layout);
|
||||
tab3TopMoneySubscript = itemView.findViewById(R.id.tab_3_top_money_layout);
|
||||
tab1TopMoney = itemView.findViewById(R.id.tab_1_top_money_text);
|
||||
tab2TopMoney = itemView.findViewById(R.id.tab_2_top_money_text);
|
||||
tab3TopMoney = itemView.findViewById(R.id.tab_3_top_money_text);
|
||||
tab1TopMoneyIcon = itemView.findViewById(R.id.tab_1_top_money_icon);
|
||||
tab2TopMoneyIcon = itemView.findViewById(R.id.tab_2_top_money_icon);
|
||||
tab3TopMoneyIcon = itemView.findViewById(R.id.tab_3_top_money_icon);
|
||||
}
|
||||
|
||||
int level = 0;
|
||||
@ -222,7 +236,28 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
}
|
||||
});
|
||||
}), tab1, tab2, tab3);
|
||||
|
||||
getAllView(((reward, view) -> {
|
||||
view.setVisibility(View.VISIBLE);
|
||||
switch (reward.getSendGiftType()) {
|
||||
case 0:
|
||||
view.setImageResource(R.mipmap.diamond);
|
||||
break;
|
||||
case 1:
|
||||
view.setImageResource(R.mipmap.gold_coin);
|
||||
break;
|
||||
default:
|
||||
view.setVisibility(View.GONE);
|
||||
}
|
||||
}), tab1TopMoneyIcon, tab2TopMoneyIcon, tab3TopMoneyIcon);
|
||||
getAllView(((reward, view) -> {
|
||||
view.setText(String.valueOf(reward.getSendRewardNeedcoin()));
|
||||
if (reward.getSendGiftType() == 999) {
|
||||
view.setText(reward.getSendRewardRestrictTime() + (WordUtil.isNewZh() ? "天" : "Day"));
|
||||
if (reward.getSendRewardRestrictTime().equals("0")) {
|
||||
view.setText(WordUtil.isNewZh()?"永久":"Forever");
|
||||
}
|
||||
}
|
||||
}), tab1TopMoney, tab2TopMoney, tab3TopMoney);
|
||||
}
|
||||
|
||||
private void getReward(LiveBattlePassRewardsBean.LiveBattlePassReward reward) {
|
||||
@ -232,9 +267,9 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
}
|
||||
if (reward.getLock() == 1) {
|
||||
//ToastUtil.show("锁了");
|
||||
if(reward.getLiveBattlePassTypeId()==2){
|
||||
if (reward.getLiveBattlePassTypeId() == 2) {
|
||||
showBuyType(true);
|
||||
}else{
|
||||
} else {
|
||||
showBuyType(false);
|
||||
}
|
||||
return;
|
||||
@ -306,13 +341,14 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
setVisibility(View.INVISIBLE, type - 1, tab1Layout, tab2Layout, tab3Layout);
|
||||
}
|
||||
}
|
||||
private void showBuyType(boolean is){
|
||||
|
||||
private void showBuyType(boolean is) {
|
||||
new XPopup.Builder(itemView.getContext())
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) itemView.getContext()) - DpUtil.dp2px(34))
|
||||
.asCustom(new ActivateEliteBattleOrderPopupWindow(
|
||||
itemView.getContext(),
|
||||
is?quintessenceSpendMoney:enjoySpendMoney,
|
||||
is ? quintessenceSpendMoney : enjoySpendMoney,
|
||||
is,
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
|
@ -80,18 +80,38 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_tab3_unselect" />
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
layout="@layout/view_battlepass_user"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp" />
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<include
|
||||
layout="@layout/view_battlepass_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/context_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/background_order_dialog" />
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/background_order_dialog_out_layout"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/context_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/background_order_dialog" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -44,9 +44,9 @@
|
||||
android:layout_height="7dp"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:background="@drawable/bg_text_battlepass_reward_point"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/reward_lv"
|
||||
app:layout_constraintStart_toStartOf="@+id/reward_lv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="@+id/reward_lv" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -74,24 +74,57 @@
|
||||
<ImageView
|
||||
android:id="@+id/tab_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_1_top_money_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_1_top_money_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:textColor="#fff"
|
||||
android:textSize="11sp"
|
||||
tools:text="10000" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_top_money_icon"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:src="@mipmap/gold_coin" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_item_unlock"
|
||||
@ -101,6 +134,7 @@
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
@ -113,21 +147,23 @@
|
||||
android:id="@+id/tab_1_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_1_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
|
||||
@ -152,23 +188,55 @@
|
||||
android:id="@+id/tab_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:layout_margin="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_2_top_money_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript2"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_2_top_money_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:textColor="#fff"
|
||||
android:textSize="11sp"
|
||||
tools:text="7天" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_top_money_icon"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/diamond" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_2_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_item_unlock"
|
||||
@ -178,6 +246,7 @@
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
@ -190,19 +259,21 @@
|
||||
android:id="@+id/tab_2_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_2_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="12sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -213,6 +284,7 @@
|
||||
android:id="@+id/tab_3_layout"
|
||||
android:layout_width="73dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_bg"
|
||||
android:layout_width="match_parent"
|
||||
@ -221,35 +293,73 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_3_bg" />
|
||||
app:layout_constraintTop_toTopOf="@id/tab_3_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_3_top_money_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_3_top_money_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:textColor="#fff"
|
||||
android:textSize="12sp"
|
||||
tools:text="100000" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_top_money_icon"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:src="@mipmap/diamond" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_unlock"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="visible"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_3_bg"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_item_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
tools:visibility="g"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
@ -259,20 +369,24 @@
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_3_title"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="12sp"
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
Loading…
Reference in New Issue
Block a user