From 05aea2448f9ea17cfea33a2e59430438dc8a366e Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 23 Dec 2023 11:01:28 +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=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialog/PromotionElitePopupWindow.java | 19 +++ .../res/layout/liberal_battle_pass_popup.xml | 5 +- .../main/res/layout/promotion_elite_popup.xml | 124 ++++++++++-------- common/src/main/res/values-en-rUS/string.xml | 2 + common/src/main/res/values-zh-rHK/strings.xml | 2 + common/src/main/res/values-zh-rTW/strings.xml | 2 + common/src/main/res/values-zh/strings.xml | 2 + common/src/main/res/values/strings.xml | 3 +- .../main/activity/BattlePassActivity.java | 7 +- .../fragment/BattlePassMissionFragment.java | 1 + main/src/main/res/values-zh/strings.xml | 4 +- main/src/main/res/values/strings.xml | 5 +- 12 files changed, 110 insertions(+), 66 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/PromotionElitePopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/PromotionElitePopupWindow.java index 767cef165..c16a17cfb 100644 --- a/common/src/main/java/com/yunbao/common/dialog/PromotionElitePopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/PromotionElitePopupWindow.java @@ -6,10 +6,14 @@ import android.content.Context; import androidx.annotation.NonNull; import com.lxj.xpopup.XPopup; +import com.lxj.xpopup.core.BasePopupView; import com.lxj.xpopup.core.CenterPopupView; import com.yunbao.common.R; +import com.yunbao.common.bean.BattlePassUserInfoBean; import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; /** @@ -19,6 +23,7 @@ public class PromotionElitePopupWindow extends CenterPopupView { private String enjoySpendMoney, quintessenceSpendMoney;//花费钱 private LiberalBattlePassPopupWindow.LiberalBattlePassCallback mPassCallback; private String elitesTypeId,enjoyTypeId; + private BattlePassUserInfoBean data; public PromotionElitePopupWindow(@NonNull Context context, String mEnjoySpendMoney, String mQuintessenceSpendMoney, LiberalBattlePassPopupWindow.LiberalBattlePassCallback passCallback, @@ -30,6 +35,10 @@ public class PromotionElitePopupWindow extends CenterPopupView { this.elitesTypeId = elitesTypeId; this.enjoyTypeId = enjoyTypeId; } + public PromotionElitePopupWindow setUserData(BattlePassUserInfoBean data) { + this.data=data; + return this; + } @Override protected int getImplLayoutId() { @@ -49,6 +58,10 @@ public class PromotionElitePopupWindow extends CenterPopupView { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.button_quintessence), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + if(data!=null && data.getBattlePassUserRecords2()==2){ + ToastUtil.show(WordUtil.getNewString(R.string.battlepass_buy_max)); + return; + } dialog.dismiss(); new XPopup.Builder(getContext()) .enableDrag(false) @@ -60,6 +73,10 @@ public class PromotionElitePopupWindow extends CenterPopupView { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.button_enjoy), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + if(data!=null && data.getBattlePassUserRecords3()==2){ + ToastUtil.show(WordUtil.getNewString(R.string.battlepass_buy_max)); + return; + } dialog.dismiss(); new XPopup.Builder(getContext()) .enableDrag(false) @@ -69,4 +86,6 @@ public class PromotionElitePopupWindow extends CenterPopupView { } }); } + + } diff --git a/common/src/main/res/layout/liberal_battle_pass_popup.xml b/common/src/main/res/layout/liberal_battle_pass_popup.xml index e49136d12..222928af4 100644 --- a/common/src/main/res/layout/liberal_battle_pass_popup.xml +++ b/common/src/main/res/layout/liberal_battle_pass_popup.xml @@ -10,7 +10,10 @@ - + > - - - + android:layout_marginBottom="16dp" + android:orientation="vertical" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - - - -