Merge remote-tracking branch 'origin/dev_6.6.4_战令' into dev_6.6.4_战令

This commit is contained in:
zlzw 2023-12-20 16:27:44 +08:00
commit 61ee585ae9
3 changed files with 18 additions and 6 deletions

View File

@ -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) {

View File

@ -32,6 +32,7 @@
android:gravity="center_vertical">
<TextView
android:id="@+id/current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="46dp"

View File

@ -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();
}
});