添加开通接口弹窗回调添加
This commit is contained in:
parent
42cfcce1dc
commit
9eba98f709
@ -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) {
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user