From 9eba98f70973edfa27b7ff0b334ea402959aa695 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 20 Dec 2023 16:26:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E9=80=9A?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=B9=E7=AA=97=E5=9B=9E=E8=B0=83=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/dialog/OrderLevelPopupWindow.java | 21 ++++++++++++++----- .../src/main/res/layout/order_level_popup.xml | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java index 5c3c94455..4888ebbfd 100644 --- a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java @@ -2,6 +2,7 @@ package com.yunbao.common.dialog; import android.content.Context; import android.view.View; +import android.widget.ProgressBar; import android.widget.TextView; import androidx.annotation.NonNull; @@ -12,15 +13,20 @@ import com.yunbao.common.R; import java.math.BigDecimal; /** - * 战令等级 + * 战令等级 经验 */ public class OrderLevelPopupWindow extends CenterPopupView { - private TextView orderLevel, orderLevelDiamond, balanceDiamond; + private TextView orderLevel, orderLevelDiamond, balanceDiamond, current; + private int currentExperience, totalExperience;//当前经验,全部经验 + private String buyExp = "100", currentLevel, balance; + private ProgressBar progressBar; - private String buyExp = "100"; - - public OrderLevelPopupWindow(@NonNull Context context) { + public OrderLevelPopupWindow(@NonNull Context context, int mCurrentExperience, int mTotalExperience, String mCurrentLevel, String mBalance) { super(context); + currentExperience = mCurrentExperience; + totalExperience = mTotalExperience; + currentLevel = mCurrentLevel; + balance = mBalance; } @Override @@ -35,7 +41,12 @@ public class OrderLevelPopupWindow extends CenterPopupView { orderLevel = findViewById(R.id.tickets_plus_minus); orderLevelDiamond = findViewById(R.id.order_level_diamond); balanceDiamond = findViewById(R.id.balance_diamond); + current = findViewById(R.id.current); orderLevel.setText(buyExp); + progressBar.setMax(totalExperience); + progressBar.setProgress(currentExperience); + current.setText(String.format("Lv%s", currentLevel)); + balanceDiamond.setText(balance); findViewById(R.id.sub).setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { diff --git a/common/src/main/res/layout/order_level_popup.xml b/common/src/main/res/layout/order_level_popup.xml index 0f0f7644f..e1037fe28 100644 --- a/common/src/main/res/layout/order_level_popup.xml +++ b/common/src/main/res/layout/order_level_popup.xml @@ -32,6 +32,7 @@ android:gravity="center_vertical"> Date: Wed, 20 Dec 2023 16:27:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E9=80=9A?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BC=B9=E7=AA=97=E5=9B=9E=E8=B0=83=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/main/views/MainHomeCommunityViewHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index 2e7e31f9b..0a3fbc5b4 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -236,7 +236,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl new XPopup.Builder(mContext) .enableDrag(false) .maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34)) - .asCustom(new LiberalBattlePassPopupWindow(mContext,"62,888",false)) + .asCustom(new OrderLevelPopupWindow(mContext,10,100,"9","900.00")) .show(); } });