6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-17 15:38:59 +08:00
parent 5a4001c858
commit 68140c8a3a
2 changed files with 42 additions and 25 deletions

View File

@ -9,9 +9,9 @@ ext {
]
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
// serverHost : "https://ceshi.yaoulive.com",
serverHost : "https://ceshi.yaoulive.com",
@ -21,10 +21,10 @@ ext {
baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB",
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
// true表示谷歌支付 false
isGooglePlay : true,
isGooglePlay : false,
//
isUploadLog : true,
//
isPluginModel : false,
isPluginModel : true,
]
}

View File

@ -469,27 +469,44 @@ public class LiveGiftPopup extends AbsDialogFragment {
findViewById(R.id.red_point).setVisibility((!TextUtils.isEmpty(coinModel.getUsersPackRedDot())) &&
TextUtils.equals(coinModel.getUsersPackRedDot(), "1") ? View.VISIBLE : View.GONE);
if (!TextUtils.equals(coinModel.getUserLevel(), coinModel.getUserLevelMax())) {
String leveNext = String.valueOf(nextLeve);
String userNextLevel = coinModel.getUserLevelUpgrades();
String hint = String.format(getString(R.string.leveling_points),
userNextLevel, leveNext);
int leveNextIndexOf = hint.indexOf(leveNext);
int leveNextSize = leveNext.length();
int userNextLevelIndexOf = hint.indexOf(userNextLevel);
int userNextLevelSize = userNextLevel.length();
SpannableStringBuilder builder = new SpannableStringBuilder();
builder.append(hint);
builder.setSpan(new
ForegroundColorSpan(Color.parseColor("#FFC722")),
leveNextIndexOf, leveNextIndexOf + leveNextSize,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
builder.setSpan(new
ForegroundColorSpan(Color.parseColor("#FFC722")),
userNextLevelIndexOf, userNextLevelIndexOf + userNextLevelSize,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
leaveHint.setText(builder);
progressBar.setProgress(nextLeve);
progressBar.setMax(maxLeve);
try {
String leveNext = String.valueOf(nextLeve);
String userNextLevel = coinModel.getUserLevelUpgrades();
StringBuffer stringBuffer = new StringBuffer();
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
stringBuffer.append("升級還需")
.append(userNextLevel)
.append("經驗值,升至")
.append(leveNext)
.append("即可領取獎勵");
} else {
stringBuffer.append(userNextLevel)
.append(" experience upgrade,")
.append(leveNext)
.append(" receive rewards");
}
String hint = stringBuffer.toString();
int leveNextIndexOf = hint.indexOf(leveNext);
int leveNextSize = leveNext.length();
int userNextLevelIndexOf = hint.indexOf(userNextLevel);
int userNextLevelSize = userNextLevel.length();
SpannableStringBuilder builder = new SpannableStringBuilder();
builder.append(hint);
builder.setSpan(new
ForegroundColorSpan(Color.parseColor("#FFC722")),
leveNextIndexOf, leveNextIndexOf + leveNextSize,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
builder.setSpan(new
ForegroundColorSpan(Color.parseColor("#FFC722")),
userNextLevelIndexOf, userNextLevelIndexOf + userNextLevelSize,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
leaveHint.setText(builder);
progressBar.setProgress(nextLeve);
progressBar.setMax(maxLeve);
} catch (Exception e) {
throw new RuntimeException(e);
}
} else {
String hint = getString(R.string.reach_the_top);
leaveHint.setText(hint);