6.5.4礼物冠名
This commit is contained in:
parent
5a4001c858
commit
68140c8a3a
@ -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,
|
||||
]
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user