[优化]:
1.直播间游戏提示优化 2.战令经验值购买优化 3.守护榜页面需美化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
@@ -16,6 +17,7 @@ import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -33,11 +35,13 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
private OrderLevelCallback orderLevelCallback;
|
||||
private long maxExp;
|
||||
private BattlePassUserInfoBean userInfoBean;
|
||||
private Context mContext;
|
||||
|
||||
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
|
||||
int mCurrentExperience, int mTotalExperience,
|
||||
String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||
super(context);
|
||||
this.mContext = context;
|
||||
this.userInfoBean = userInfoBean;
|
||||
currentExperience = mCurrentExperience;
|
||||
totalExperience = mTotalExperience;
|
||||
@@ -67,7 +71,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
progressBar.setProgress(currentExperience);
|
||||
expText.setText(String.format("%s/%s", userInfoBean.getBattlePassExp(), userInfoBean.getNextLevelExp()));
|
||||
current.setText(String.format("Lv%s", currentLevel));
|
||||
balanceDiamond.setText(balance);
|
||||
balanceDiamond.setText(WordUtil.isNewZh()?"剩餘:":"Balance:"+balance);
|
||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -75,7 +79,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
if (exp > 100) {
|
||||
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).subtract(new BigDecimal("100"));
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevelDiamond.setText("00 = "+String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevel.setText(buyExp);
|
||||
}
|
||||
}
|
||||
@@ -87,7 +91,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
if (exp < maxExp && exp < 10000) {
|
||||
BigDecimal buyExpBigDecimal = new BigDecimal(buyExp).add(new BigDecimal("100"));
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevelDiamond.setText("00 = "+String.valueOf(buyExpBigDecimal.floatValue()));
|
||||
orderLevel.setText(buyExp);
|
||||
} else if (exp >= maxExp) {
|
||||
ToastUtil.show(WordUtil.isNewZh() ? "经验已滿" : "Experience full");
|
||||
@@ -125,13 +129,29 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
||||
});
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.tickets_plus_minus), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
DialogUitl.showSimpleInputDialog(mContext, getResources().getString(R.string.buying_experience_point), DialogUitl.INPUT_TYPE_NUMBER, 4, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
orderLevel.setText(content);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
IMLoginManager.get(getContext())
|
||||
.updateUserCoin(new OnItemClickListener<JSONObject>() {
|
||||
@Override
|
||||
public void onItemClick(JSONObject bean, int position) {
|
||||
if (bean != null) {
|
||||
balance = bean.getString("coin");
|
||||
balanceDiamond.setText(balance);
|
||||
balanceDiamond.setText(WordUtil.isNewZh()?"剩餘:":"Balance:"+balance);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user