新增战令购买经验对话框经验条上加入经验文本

This commit is contained in:
2024-01-05 13:57:55 +08:00
parent 8a7b65955c
commit 4a5e581978
3 changed files with 37 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ import java.math.BigDecimal;
* 战令等级 经验
*/
public class OrderLevelPopupWindow extends CenterPopupView {
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current;
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current,expText;
private int currentExperience, totalExperience;//当前经验,全部经验
private String buyExp = "100", currentLevel, balance;
private ProgressBar progressBar;
@@ -55,9 +55,11 @@ public class OrderLevelPopupWindow extends CenterPopupView {
balanceDiamond = findViewById(R.id.balance_diamond);
current = findViewById(R.id.current);
progressBar = findViewById(R.id.progressBar);
expText = findViewById(R.id.exp_text);
orderLevel.setText(buyExp);
progressBar.setMax(totalExperience);
progressBar.setProgress(currentExperience);
expText.setText(String.format("%s/%s", currentExperience, totalExperience));
current.setText(String.format("Lv%s", currentLevel));
balanceDiamond.setText(balance);
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {