修改中英文
This commit is contained in:
parent
fc2d700a31
commit
8abf92d42c
@ -1,5 +1,7 @@
|
||||
package com.yunbao.common.event;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
@ -21,6 +23,8 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
private String totalcoin;
|
||||
@SerializedName("giftname")
|
||||
private String giftname;
|
||||
@SerializedName("giftname_en")
|
||||
private String giftname_en;
|
||||
@SerializedName("giftnameen")
|
||||
private String giftnameen;
|
||||
@SerializedName("gifticon")
|
||||
@ -69,6 +73,8 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
private String needcoin;
|
||||
@SerializedName("gift_msg")
|
||||
private String giftMsg;
|
||||
@SerializedName("gift_msg_en")
|
||||
private String giftMsgen;
|
||||
@SerializedName("gift_colour")
|
||||
private String giftColour;
|
||||
@SerializedName("box_type")
|
||||
@ -119,6 +125,15 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftMsgen() {
|
||||
return giftMsgen;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setGiftMsgen(String giftMsgen) {
|
||||
this.giftMsgen = giftMsgen;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setUserNiceName(String userNiceName) {
|
||||
this.userNiceName = userNiceName;
|
||||
return this;
|
||||
@ -556,4 +571,13 @@ public class SendBlindGiftEvent extends BaseModel {
|
||||
this.liveGiftNotify = liveGiftNotify;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftname_en() {
|
||||
return TextUtils.isEmpty(giftname_en)?giftnameen:giftname_en;
|
||||
}
|
||||
|
||||
public SendBlindGiftEvent setGiftname_en(String giftname_en) {
|
||||
this.giftname_en = giftname_en;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -36,23 +36,22 @@ public class WordsTypeUtil {
|
||||
|
||||
/**
|
||||
* @param {*} num
|
||||
* @returns ---汉字
|
||||
*/
|
||||
* @returns ---汉字 */
|
||||
// 转换数字为大写
|
||||
public static String numberConvertToUppercase(int number) {
|
||||
String[] upperCaseNumber = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};
|
||||
int length = String.valueOf(number).length();
|
||||
if (length == 1) {
|
||||
return upperCaseNumber[number];
|
||||
return WordUtil.isNewZh() ? upperCaseNumber[number] : String.valueOf(number);
|
||||
} else if (length == 2) {
|
||||
if (number == 10) {
|
||||
return upperCaseNumber[number];
|
||||
return WordUtil.isNewZh() ? upperCaseNumber[number] : String.valueOf(number);
|
||||
} else if (number > 10 && number < 20) {
|
||||
return upperCaseNumber[10] + upperCaseNumber[number - 10];
|
||||
return WordUtil.isNewZh() ? upperCaseNumber[10] : "1" + (WordUtil.isNewZh() ? upperCaseNumber[number - 10] : String.valueOf(number - 10));
|
||||
} else {
|
||||
int num1 = number / 10;
|
||||
int num2 = number - (num1 * 10);
|
||||
return upperCaseNumber[num1] + upperCaseNumber[10] + upperCaseNumber[num2];
|
||||
return (WordUtil.isNewZh() ? upperCaseNumber[num1] : String.valueOf(num1)) + (WordUtil.isNewZh() ? upperCaseNumber[10] : "") + (WordUtil.isNewZh() ? upperCaseNumber[num2] : String.valueOf(num2));
|
||||
}
|
||||
} else {
|
||||
return String.valueOf(number);
|
||||
|
@ -18,7 +18,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="150dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginTop="10dp"
|
||||
@ -50,12 +52,13 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="170dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_toLeftOf="@id/to_receive_layout"
|
||||
android:layout_toEndOf="@id/icon"
|
||||
android:text="赠送送玫瑰 (5/5)"
|
||||
|
@ -1490,8 +1490,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
}
|
||||
//插入盲盒礼物消息
|
||||
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
||||
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
||||
bean.getLiveChatBean().setContent(WordUtil.isNewZh()?event.getGiftMsg():event.getGiftMsgen());
|
||||
bean.getLiveChatBean().setGiftName(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/22.
|
||||
@ -54,10 +55,15 @@ public class LiveChatBean {
|
||||
private String hot_card;
|
||||
private MsgModel msgModel = new MsgModel();//自定义消息体
|
||||
private String giftName;
|
||||
private String giftname_en;
|
||||
private String toUid;
|
||||
|
||||
public int getNORMAL() {
|
||||
return NORMAL;
|
||||
}
|
||||
|
||||
public String getGiftName() {
|
||||
return giftName;
|
||||
return WordUtil.isNewZh()?giftName:giftname_en;
|
||||
}
|
||||
|
||||
public LiveChatBean setGiftName(String giftName) {
|
||||
|
@ -23,6 +23,7 @@ import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
@ -131,7 +132,7 @@ public class LiveFansFragment extends AbsDialogFragment {
|
||||
LiveAudienceActivity.is_fans = "2";
|
||||
int num = LiveAudienceActivity.fansNum - 1;
|
||||
LiveRoomViewHolder.setFansNum(num);
|
||||
ToastUtil.show("退出成功");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"退出成功":"Exit successfully");
|
||||
EventBus.getDefault().post("exitFansGroup");
|
||||
dismiss();
|
||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
||||
|
@ -1239,12 +1239,12 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), event.getGiftname(), event.getDressName());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en(), event.getDressName());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
||||
int dressNameSize = event.getDressName().length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||
int giftNameSize = event.getGiftname().length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||
dressNameIndex,
|
||||
dressNameIndex + dressNameSize,
|
||||
@ -1256,10 +1256,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
stringBuilders.add(stringBuilder);
|
||||
} else {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), event.getGiftname());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3),WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||
int giftNameSize = event.getGiftname().length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||
giftNameIndex,
|
||||
giftNameIndex + giftNameSize,
|
||||
|
@ -1102,12 +1102,12 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
}
|
||||
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), event.getGiftname(), event.getDressName());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability2), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en(), event.getDressName());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
||||
int dressNameSize = event.getDressName().length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||
int giftNameSize = event.getGiftname().length();
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||
dressNameIndex,
|
||||
dressNameIndex + dressNameSize,
|
||||
@ -1119,14 +1119,17 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
||||
stringBuilders.add(stringBuilder);
|
||||
} else {
|
||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), event.getGiftname());
|
||||
String boxBlindMsg = String.format(mContext.getString(R.string.random_availability3), WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
stringBuilder.append(boxBlindMsg);
|
||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
||||
int giftNameSize = event.getGiftname().length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||
giftNameIndex,
|
||||
giftNameIndex + giftNameSize,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
if (!TextUtils.isEmpty(event.getGiftname_en())){
|
||||
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||
giftNameIndex,
|
||||
giftNameIndex + giftNameSize,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
|
||||
stringBuilders.add(stringBuilder);
|
||||
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.adapter.GuardRightAdapter;
|
||||
@ -260,10 +261,10 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
||||
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.guard_buy_tip));
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.isNewZh()?"您為當前主播的年守護無法開通周守護":"Your annual guardian for the current anchor cannot be opened weekly guardian");
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通月守護");
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.isNewZh()?"您為當前主播的年守護無法開通月守護":"The year guard for your current anchor cannot be opened");
|
||||
return;
|
||||
} else {
|
||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||
@ -277,7 +278,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
||||
DialogUitl.showSimpleDialog(mContext, "您為當前主播的周守護,開通月守護將覆蓋您的周守護時長,是否開通?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh()?"您為當前主播的周守護,開通月守護將覆蓋您的周守護時長,是否開通?":"You are the weekly guardian of the current anchor. Opening the monthly guardian will cover your weekly guardian time. Is it open?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
doBuyGuard();
|
||||
@ -286,7 +287,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
||||
DialogUitl.showSimpleDialog(mContext, "您為當前主播的周守護,開通年守護將覆蓋您的周守護時長,是否開通?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh()?"您為當前主播的周守護,開通年守護將覆蓋您的周守護時長,是否開通?":"You are the weekly guardian of the current anchor, and the opening year guardian will cover your weekly guardian time. Is it open?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
doBuyGuard();
|
||||
@ -307,7 +308,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
||||
return;
|
||||
}
|
||||
DialogUitl.showSimpleDialog(mContext,
|
||||
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
String.format(WordUtil.isNewZh()?"您將花費%1$s%2$s,為主播開通%3$s":"You will spend%1$s%2$s to open%3$s for the anchor", mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
new DialogUitl.SimpleCallback() {
|
||||
|
||||
@Override
|
||||
|
@ -33,6 +33,8 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
@ -46,8 +48,6 @@ import com.yunbao.live.adapter.LiveNewGuardBuyItemsAdapter;
|
||||
import com.yunbao.live.bean.GuardBuyBean;
|
||||
import com.yunbao.live.bean.GuardRightBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -175,7 +175,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
mAncherIcon = bundle.getString(Constants.LIVE_ANCHER_ICON);
|
||||
mUserIcon = bundle.getString(Constants.USER_ICON);
|
||||
showBuyView = bundle.getBoolean("showBuyView", true);
|
||||
String coinName =mContext.getString(R.string.diamond);
|
||||
String coinName = mContext.getString(R.string.diamond);
|
||||
mCoinName = coinName;
|
||||
isEmpty = bundle.getBoolean("guard", true);
|
||||
// mCoinNameTextView.setText(mContext.getString(R.string.guard_my) + coinName + ":");
|
||||
@ -200,13 +200,13 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
mGuardRightAdapter.setList(mRightList);
|
||||
buyItemsAdapter.notifyDataSetChanged();
|
||||
|
||||
if(bundle.getString("by")!=null){
|
||||
if (bundle.getString("by") != null) {
|
||||
// if(bundle.getString("by").equals("1")){
|
||||
// refreshList(Integer.parseInt(bundle.getString("by")));
|
||||
// }else {
|
||||
refreshList(Integer.parseInt(bundle.getString("by")));
|
||||
refreshList(Integer.parseInt(bundle.getString("by")));
|
||||
// }
|
||||
}else{
|
||||
} else {
|
||||
refreshList(1);
|
||||
}
|
||||
|
||||
@ -325,18 +325,18 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
}
|
||||
Log.d("ffffff", "" + mLiveGuardInfo.getMyGuardType() + " " + mTargetBuyBean.getType());
|
||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.guard_buy_tip));
|
||||
DialogUitl.showSimpleTipDialog(mContext, mContext.getString(R.string.guard_buy_tip));
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通周守護");
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.isNewZh() ? "您為當前主播的年守護無法開通周守護" : "Your annual guardian for the current anchor cannot be opened weekly guardian");
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
||||
DialogUitl.showSimpleTipDialog(mContext, "您為當前主播的年守護無法開通月守護");
|
||||
DialogUitl.showSimpleTipDialog(mContext, WordUtil.isNewZh() ? "您為當前主播的年守護無法開通月守護" : "The year guard for your current anchor cannot be opened");
|
||||
return;
|
||||
} else {
|
||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
||||
DialogUitl.showSimpleDialog(mContext,mContext.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, mContext.getString(R.string.guard_buy_tip_2), new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
doBuyGuard();
|
||||
@ -345,7 +345,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
||||
DialogUitl.showSimpleDialog(mContext, "您為當前主播的周守護,開通月守護將覆蓋您的周守護時長,是否開通?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh() ? "您為當前主播的周守護,開通月守護將覆蓋您的周守護時長,是否開通?" : "You are the weekly guardian of the current anchor. Opening the monthly guardian will cover your weekly guardian time. Is it open?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
doBuyGuard();
|
||||
@ -354,7 +354,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
return;
|
||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
||||
DialogUitl.showSimpleDialog(mContext, "您為當前主播的周守護,開通年守護將覆蓋您的周守護時長,是否開通?", new DialogUitl.SimpleCallback() {
|
||||
DialogUitl.showSimpleDialog(mContext, WordUtil.isNewZh() ? "您為當前主播的周守護,開通年守護將覆蓋您的周守護時長,是否開通?" : "You are the weekly guardian of the current anchor, and the opening year guardian will cover your weekly guardian time. Is it open?", new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
doBuyGuard();
|
||||
@ -417,7 +417,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
bean = datum;
|
||||
}
|
||||
}
|
||||
String str = String.format(mContext.getString(R.string.live_use_discount_content),
|
||||
String str = String.format(WordUtil.getNewString(R.string.live_use_discount_content),
|
||||
bean.getName(),
|
||||
"###",//占位符
|
||||
"###"
|
||||
@ -462,7 +462,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
private void buy() {
|
||||
DialogUitl.showSimpleDialog(mContext,
|
||||
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin()+"", mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
String.format(WordUtil.isNewZh() ? "您將花費%1$s%2$s,為主播開通%3$s" : "You will spend%1$s%2$s to open%3$s for the anchor", mTargetBuyBean.getCoin() + "", mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
new DialogUitl.SimpleCallback() {
|
||||
|
||||
@Override
|
||||
@ -499,7 +499,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
}
|
||||
((LiveActivity) mContext).sendBuyGuardMessage2(votes, guardNum, guardType, ancherName, liveuid);
|
||||
dismiss();
|
||||
}else if(code==1002){
|
||||
} else if (code == 1002) {
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
@ -53,6 +53,7 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
@ -403,7 +404,7 @@ public class LiveGiftAnimPresenter {
|
||||
String uid = mTempGifGiftBean.getUid();
|
||||
String userId = CommonAppConfig.getInstance().getUid();
|
||||
if (userId.equals(uid)) {
|
||||
ToastUtil.show("已在当前直播间");
|
||||
ToastUtil.show(WordUtil.isNewZh()?"已在当前直播间":"Already in the current studio");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ public class SocketChatUtil {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
String s = action == 1 ? CommonAppContext.sInstance.getBaseContext().getString(R.string.live_set_admin) : CommonAppContext.sInstance.getBaseContext().getString(R.string.live_set_admin_cancel);
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)": "被取消管理員(Cancelled administrator)";
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||
.param("action", action)
|
||||
|
@ -477,7 +477,7 @@ public class SocketRyChatUtil {
|
||||
if (u == null) {
|
||||
return;
|
||||
}
|
||||
String s = action == 1 ? CommonAppContext.sInstance.getBaseContext().getString(R.string.live_set_admin) : CommonAppContext.sInstance.getBaseContext().getString(R.string.live_set_admin_cancel);
|
||||
String s = action == 1 ? "被設為管理員(Set as Administrator)": "被取消管理員(Cancelled administrator)";
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||
.param("action", action)
|
||||
|
@ -1097,7 +1097,7 @@ public class SocketRyClient {
|
||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||
receiveGiftBean.setmTypeBuyGuard(false);
|
||||
receiveGiftBean.setAllServerNotify(false);
|
||||
|
||||
sendBlindGiftEvent.setGiftname_en(map.getString("giftname_en"));
|
||||
//获取PK排名数据
|
||||
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
||||
|
||||
|
@ -90,12 +90,21 @@ public class LiveTextRender {
|
||||
String chatMsg = bean.getContent();
|
||||
int userNiceNameIndex = chatMsg.indexOf(bean.getUserNiceName());
|
||||
int userNiceNameSize = bean.getUserNiceName().length();
|
||||
int giftNameIndex = chatMsg.indexOf(bean.getGiftName());
|
||||
int giftNameSize = bean.getGiftName().length();
|
||||
int giftNameIndex = -1;
|
||||
int giftNameSize = -1;
|
||||
if (!TextUtils.isEmpty(chatMsg)&&!TextUtils.isEmpty(bean.getGiftName())&&chatMsg.contains(bean.getGiftName())) {
|
||||
giftNameIndex = chatMsg.indexOf(bean.getGiftName());
|
||||
|
||||
giftNameSize = bean.getGiftName().length();
|
||||
}
|
||||
|
||||
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
builder.append(chatMsg);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#78FEFF")), userNiceNameIndex, userNiceNameIndex + userNiceNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF86C")), giftNameIndex, giftNameIndex + giftNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
if (giftNameIndex != -1) {
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF86C")), giftNameIndex, giftNameIndex + giftNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
textView.setText(builder);
|
||||
}
|
||||
|
||||
|
@ -1203,8 +1203,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
}
|
||||
//插入盲盒礼物消息
|
||||
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
||||
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
||||
bean.getLiveChatBean().setContent(WordUtil.isNewZh()?event.getGiftMsg():event.getGiftMsgen());
|
||||
bean.getLiveChatBean().setGiftName(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
||||
}
|
||||
|
||||
|
BIN
live/src/main/res/mipmap-b+en+us/bixin.png
Normal file
BIN
live/src/main/res/mipmap-b+en+us/bixin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
live/src/main/res/mipmap-b+en+us/grayicon.png
Normal file
BIN
live/src/main/res/mipmap-b+en+us/grayicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
BIN
live/src/main/res/mipmap-b+en+us/ic_guard_not.png
Normal file
BIN
live/src/main/res/mipmap-b+en+us/ic_guard_not.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 180 KiB |
Loading…
Reference in New Issue
Block a user