From 0e596e9be9ef2ebadb45e321ac0e1bf359d2bce3 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 23 Jan 2024 17:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E5=8F=8D?= =?UTF-8?q?=E9=A6=88BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/bean/BattlePassPoints.java | 57 +++++++++++++++++++ .../common/dialog/SudGameListPopup.java | 32 +++++------ .../adapter/BattlePassExchangeAdapter.java | 30 +++++++++- .../res/layout/item_battlepass_exchange.xml | 29 ++++++++++ 4 files changed, 131 insertions(+), 17 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java b/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java index add65fdb2..798fdacd8 100644 --- a/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java +++ b/common/src/main/java/com/yunbao/common/bean/BattlePassPoints.java @@ -34,6 +34,13 @@ public class BattlePassPoints extends BaseModel{ @SerializedName("exchange_status_remark") private String exchangeMark; + @SerializedName("send_reward_type") + private int sendRewardType; + @SerializedName("send_gift_type") + private int sendGiftType; + @SerializedName("send_gift_needcoin") + private String sendGiftNeedcoin; + public BattlePassPoints() { } @@ -172,4 +179,54 @@ public class BattlePassPoints extends BaseModel{ public void setPointsThresholdText(String pointsThresholdText) { this.pointsThresholdText = pointsThresholdText; } + + 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 getSendGiftNeedcoin() { + return sendGiftNeedcoin; + } + + public void setSendGiftNeedcoin(String sendGiftNeedcoin) { + this.sendGiftNeedcoin = sendGiftNeedcoin; + } + + @Override + public String toString() { + return "BattlePassPoints{" + + "id=" + id + + ", type=" + type + + ", rewardsName='" + rewardsName + '\'' + + ", rewardsId=" + rewardsId + + ", imageUrl='" + imageUrl + '\'' + + ", pointsThreshold='" + pointsThreshold + '\'' + + ", pointsThresholdText='" + pointsThresholdText + '\'' + + ", rewardsValue='" + rewardsValue + '\'' + + ", battlePassLevel=" + battlePassLevel + + ", exchangeQuantity=" + exchangeQuantity + + ", liveBattlePassTypeId=" + liveBattlePassTypeId + + ", description='" + description + '\'' + + ", restrictTime=" + restrictTime + + ", sort=" + sort + + ", exchangeStatus=" + exchangeStatus + + ", userQuintyCount=" + userQuintyCount + + ", exchangeMark='" + exchangeMark + '\'' + + ", sendRewardType=" + sendRewardType + + ", sendGiftType=" + sendGiftType + + ", sendRewardNeedcoin='" + sendGiftNeedcoin + '\'' + + '}'; + } } diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java index 93cfd6202..90b7ec8a8 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -277,30 +277,30 @@ public class SudGameListPopup extends BottomPopupView { } }); if (interactionID == 0) { - gameTitle.setTextColor(getYellowColor()); - } else { gameTitle.setTextColor(getDefColor()); + } else { + gameTitle.setTextColor(getYellowColor()); } if (mSill.equals("0,0,0")) { - sillTitle.setTextColor(getYellowColor()); - } else { sillTitle.setTextColor(getDefColor()); + } else { + sillTitle.setTextColor(getYellowColor()); } if ("0".equals(roomHolderType)) { - houseOwnerTitle.setTextColor(getYellowColor()); - } else { houseOwnerTitle.setTextColor(getDefColor()); + } else { + houseOwnerTitle.setTextColor(getYellowColor()); } } + private int getYellowColor() { + return Color.parseColor("#FF8D41"); + } + private int getDefColor() { return Color.WHITE; } - private int getYellowColor() { - return Color.YELLOW; - } - @Override public void dismiss() { Bus.getOff(this); @@ -318,9 +318,9 @@ public class SudGameListPopup extends BottomPopupView { public void onSudGameListEvent(SudGameListEvent event) { interactionID = event.getInteractionID(); if (interactionID == 0) { - gameTitle.setTextColor(getYellowColor()); - } else { gameTitle.setTextColor(getDefColor()); + } else { + gameTitle.setTextColor(getYellowColor()); } if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { gameTitle.setText(event.getTitle()); @@ -355,9 +355,9 @@ public class SudGameListPopup extends BottomPopupView { sillTitle.setText(mSillName.substring(0, mSillName.length() - 2)); } if (mSill.equals("0,0,0")) { - sillTitle.setTextColor(getYellowColor()); - } else { sillTitle.setTextColor(getDefColor()); + } else { + sillTitle.setTextColor(getYellowColor()); } ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f); @@ -378,9 +378,9 @@ public class SudGameListPopup extends BottomPopupView { animator.start(); mRefreshView.initData(); if ("0".equals(roomHolderType)) { - houseOwnerTitle.setTextColor(getYellowColor()); - } else { houseOwnerTitle.setTextColor(getDefColor()); + } else { + houseOwnerTitle.setTextColor(getYellowColor()); } } diff --git a/main/src/main/java/com/yunbao/main/adapter/BattlePassExchangeAdapter.java b/main/src/main/java/com/yunbao/main/adapter/BattlePassExchangeAdapter.java index ebad54ee5..4a3898c9c 100644 --- a/main/src/main/java/com/yunbao/main/adapter/BattlePassExchangeAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/BattlePassExchangeAdapter.java @@ -8,6 +8,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; @@ -76,6 +77,10 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter + + + + + + +