修改中英文
This commit is contained in:
parent
fc2d700a31
commit
8abf92d42c
@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.common.event;
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
@ -21,6 +23,8 @@ public class SendBlindGiftEvent extends BaseModel {
|
|||||||
private String totalcoin;
|
private String totalcoin;
|
||||||
@SerializedName("giftname")
|
@SerializedName("giftname")
|
||||||
private String giftname;
|
private String giftname;
|
||||||
|
@SerializedName("giftname_en")
|
||||||
|
private String giftname_en;
|
||||||
@SerializedName("giftnameen")
|
@SerializedName("giftnameen")
|
||||||
private String giftnameen;
|
private String giftnameen;
|
||||||
@SerializedName("gifticon")
|
@SerializedName("gifticon")
|
||||||
@ -69,6 +73,8 @@ public class SendBlindGiftEvent extends BaseModel {
|
|||||||
private String needcoin;
|
private String needcoin;
|
||||||
@SerializedName("gift_msg")
|
@SerializedName("gift_msg")
|
||||||
private String giftMsg;
|
private String giftMsg;
|
||||||
|
@SerializedName("gift_msg_en")
|
||||||
|
private String giftMsgen;
|
||||||
@SerializedName("gift_colour")
|
@SerializedName("gift_colour")
|
||||||
private String giftColour;
|
private String giftColour;
|
||||||
@SerializedName("box_type")
|
@SerializedName("box_type")
|
||||||
@ -119,6 +125,15 @@ public class SendBlindGiftEvent extends BaseModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGiftMsgen() {
|
||||||
|
return giftMsgen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendBlindGiftEvent setGiftMsgen(String giftMsgen) {
|
||||||
|
this.giftMsgen = giftMsgen;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public SendBlindGiftEvent setUserNiceName(String userNiceName) {
|
public SendBlindGiftEvent setUserNiceName(String userNiceName) {
|
||||||
this.userNiceName = userNiceName;
|
this.userNiceName = userNiceName;
|
||||||
return this;
|
return this;
|
||||||
@ -556,4 +571,13 @@ public class SendBlindGiftEvent extends BaseModel {
|
|||||||
this.liveGiftNotify = liveGiftNotify;
|
this.liveGiftNotify = liveGiftNotify;
|
||||||
return this;
|
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
|
* @param {*} num
|
||||||
* @returns ---汉字
|
* @returns ---汉字 */
|
||||||
*/
|
|
||||||
// 转换数字为大写
|
// 转换数字为大写
|
||||||
public static String numberConvertToUppercase(int number) {
|
public static String numberConvertToUppercase(int number) {
|
||||||
String[] upperCaseNumber = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};
|
String[] upperCaseNumber = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"};
|
||||||
int length = String.valueOf(number).length();
|
int length = String.valueOf(number).length();
|
||||||
if (length == 1) {
|
if (length == 1) {
|
||||||
return upperCaseNumber[number];
|
return WordUtil.isNewZh() ? upperCaseNumber[number] : String.valueOf(number);
|
||||||
} else if (length == 2) {
|
} else if (length == 2) {
|
||||||
if (number == 10) {
|
if (number == 10) {
|
||||||
return upperCaseNumber[number];
|
return WordUtil.isNewZh() ? upperCaseNumber[number] : String.valueOf(number);
|
||||||
} else if (number > 10 && number < 20) {
|
} 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 {
|
} else {
|
||||||
int num1 = number / 10;
|
int num1 = number / 10;
|
||||||
int num2 = number - (num1 * 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 {
|
} else {
|
||||||
return String.valueOf(number);
|
return String.valueOf(number);
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
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_height="wrap_content"
|
||||||
android:layout_marginStart="9dp"
|
android:layout_marginStart="9dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
@ -50,12 +52,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subtitle"
|
android:id="@+id/subtitle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="170dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_below="@id/title"
|
android:layout_below="@id/title"
|
||||||
android:layout_marginStart="9dp"
|
android:layout_marginStart="9dp"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
android:layout_marginEnd="70dp"
|
|
||||||
android:layout_toLeftOf="@id/to_receive_layout"
|
android:layout_toLeftOf="@id/to_receive_layout"
|
||||||
android:layout_toEndOf="@id/icon"
|
android:layout_toEndOf="@id/icon"
|
||||||
android:text="赠送送玫瑰 (5/5)"
|
android:text="赠送送玫瑰 (5/5)"
|
||||||
|
@ -1490,8 +1490,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
|||||||
}
|
}
|
||||||
//插入盲盒礼物消息
|
//插入盲盒礼物消息
|
||||||
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||||
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
bean.getLiveChatBean().setContent(WordUtil.isNewZh()?event.getGiftMsg():event.getGiftMsgen());
|
||||||
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
bean.getLiveChatBean().setGiftName(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||||
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/22.
|
* Created by cxf on 2017/8/22.
|
||||||
@ -54,10 +55,15 @@ public class LiveChatBean {
|
|||||||
private String hot_card;
|
private String hot_card;
|
||||||
private MsgModel msgModel = new MsgModel();//自定义消息体
|
private MsgModel msgModel = new MsgModel();//自定义消息体
|
||||||
private String giftName;
|
private String giftName;
|
||||||
|
private String giftname_en;
|
||||||
private String toUid;
|
private String toUid;
|
||||||
|
|
||||||
|
public int getNORMAL() {
|
||||||
|
return NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGiftName() {
|
public String getGiftName() {
|
||||||
return giftName;
|
return WordUtil.isNewZh()?giftName:giftname_en;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveChatBean setGiftName(String giftName) {
|
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.JavascriptInterfaceUtils;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
@ -131,7 +132,7 @@ public class LiveFansFragment extends AbsDialogFragment {
|
|||||||
LiveAudienceActivity.is_fans = "2";
|
LiveAudienceActivity.is_fans = "2";
|
||||||
int num = LiveAudienceActivity.fansNum - 1;
|
int num = LiveAudienceActivity.fansNum - 1;
|
||||||
LiveRoomViewHolder.setFansNum(num);
|
LiveRoomViewHolder.setFansNum(num);
|
||||||
ToastUtil.show("退出成功");
|
ToastUtil.show(WordUtil.isNewZh()?"退出成功":"Exit successfully");
|
||||||
EventBus.getDefault().post("exitFansGroup");
|
EventBus.getDefault().post("exitFansGroup");
|
||||||
dismiss();
|
dismiss();
|
||||||
} else if (TextUtils.equals(event.getMethod(), "sendFansCard")) {
|
} 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())) {
|
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
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);
|
stringBuilder.append(boxBlindMsg);
|
||||||
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
||||||
int dressNameSize = event.getDressName().length();
|
int dressNameSize = event.getDressName().length();
|
||||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||||
int giftNameSize = event.getGiftname().length();
|
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||||
dressNameIndex,
|
dressNameIndex,
|
||||||
dressNameIndex + dressNameSize,
|
dressNameIndex + dressNameSize,
|
||||||
@ -1256,10 +1256,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
stringBuilders.add(stringBuilder);
|
stringBuilders.add(stringBuilder);
|
||||||
} else {
|
} else {
|
||||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
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);
|
stringBuilder.append(boxBlindMsg);
|
||||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||||
int giftNameSize = event.getGiftname().length();
|
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||||
giftNameIndex,
|
giftNameIndex,
|
||||||
giftNameIndex + giftNameSize,
|
giftNameIndex + giftNameSize,
|
||||||
|
@ -1102,12 +1102,12 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
if (!TextUtils.isEmpty(event.getDressName()) && !TextUtils.isEmpty(event.getDressMsg())) {
|
||||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
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);
|
stringBuilder.append(boxBlindMsg);
|
||||||
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
int dressNameIndex = boxBlindMsg.indexOf(event.getDressName());
|
||||||
int dressNameSize = event.getDressName().length();
|
int dressNameSize = event.getDressName().length();
|
||||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
int giftNameIndex = boxBlindMsg.indexOf(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||||
int giftNameSize = event.getGiftname().length();
|
int giftNameSize = (WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en()).length();
|
||||||
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getDressColour())),
|
||||||
dressNameIndex,
|
dressNameIndex,
|
||||||
dressNameIndex + dressNameSize,
|
dressNameIndex + dressNameSize,
|
||||||
@ -1119,14 +1119,17 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
stringBuilders.add(stringBuilder);
|
stringBuilders.add(stringBuilder);
|
||||||
} else {
|
} else {
|
||||||
SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
|
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);
|
stringBuilder.append(boxBlindMsg);
|
||||||
int giftNameIndex = boxBlindMsg.indexOf(event.getGiftname());
|
if (!TextUtils.isEmpty(event.getGiftname_en())){
|
||||||
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())),
|
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(event.getGiftColour())),
|
||||||
giftNameIndex,
|
giftNameIndex,
|
||||||
giftNameIndex + giftNameSize,
|
giftNameIndex + giftNameSize,
|
||||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
}
|
||||||
|
|
||||||
stringBuilders.add(stringBuilder);
|
stringBuilders.add(stringBuilder);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.utils.DialogUitl;
|
|||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.adapter.GuardRightAdapter;
|
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));
|
DialogUitl.showSimpleTipDialog(mContext,mContext.getString(R.string.guard_buy_tip));
|
||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
} 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;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
} 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;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||||
@ -277,7 +278,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -286,7 +287,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -307,7 +308,7 @@ public class LiveGuardBuyDialogFragment extends AbsDialogFragment implements Vie
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,6 +33,8 @@ import com.yunbao.common.bean.UserBean;
|
|||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
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.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
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.GuardBuyBean;
|
||||||
import com.yunbao.live.bean.GuardRightBean;
|
import com.yunbao.live.bean.GuardRightBean;
|
||||||
import com.yunbao.live.bean.LiveGuardInfo;
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -328,10 +328,10 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
DialogUitl.showSimpleTipDialog(mContext, mContext.getString(R.string.guard_buy_tip));
|
DialogUitl.showSimpleTipDialog(mContext, mContext.getString(R.string.guard_buy_tip));
|
||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_DAY) {
|
} 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;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_YEAR && mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
} 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;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_MONTH
|
||||||
@ -345,7 +345,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_MONTH) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -354,7 +354,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
return;
|
return;
|
||||||
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
} else if (mLiveGuardInfo.getMyGuardType() == Constants.GUARD_TYPE_DAY
|
||||||
&& mTargetBuyBean.getType() == Constants.GUARD_TYPE_YEAR) {
|
&& 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
|
@Override
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
doBuyGuard();
|
doBuyGuard();
|
||||||
@ -417,7 +417,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
bean = datum;
|
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(),
|
bean.getName(),
|
||||||
"###",//占位符
|
"###",//占位符
|
||||||
"###"
|
"###"
|
||||||
@ -462,7 +462,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
|||||||
|
|
||||||
private void buy() {
|
private void buy() {
|
||||||
DialogUitl.showSimpleDialog(mContext,
|
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() {
|
new DialogUitl.SimpleCallback() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,6 +53,7 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||||
@ -403,7 +404,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
String uid = mTempGifGiftBean.getUid();
|
String uid = mTempGifGiftBean.getUid();
|
||||||
String userId = CommonAppConfig.getInstance().getUid();
|
String userId = CommonAppConfig.getInstance().getUid();
|
||||||
if (userId.equals(uid)) {
|
if (userId.equals(uid)) {
|
||||||
ToastUtil.show("已在当前直播间");
|
ToastUtil.show(WordUtil.isNewZh()?"已在当前直播间":"Already in the current studio");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ public class SocketChatUtil {
|
|||||||
if (u == null) {
|
if (u == null) {
|
||||||
return;
|
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()
|
final SocketSendBean msg = new SocketSendBean()
|
||||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||||
.param("action", action)
|
.param("action", action)
|
||||||
|
@ -477,7 +477,7 @@ public class SocketRyChatUtil {
|
|||||||
if (u == null) {
|
if (u == null) {
|
||||||
return;
|
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()
|
final SocketSendBean msg = new SocketSendBean()
|
||||||
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
.param("_method_", Constants.SOCKET_SET_ADMIN)
|
||||||
.param("action", action)
|
.param("action", action)
|
||||||
|
@ -1097,7 +1097,7 @@ public class SocketRyClient {
|
|||||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||||
receiveGiftBean.setmTypeBuyGuard(false);
|
receiveGiftBean.setmTypeBuyGuard(false);
|
||||||
receiveGiftBean.setAllServerNotify(false);
|
receiveGiftBean.setAllServerNotify(false);
|
||||||
|
sendBlindGiftEvent.setGiftname_en(map.getString("giftname_en"));
|
||||||
//获取PK排名数据
|
//获取PK排名数据
|
||||||
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
LivePKUserListBean livePKUserListBean = JSON.parseObject(receiveGiftBean.getPkTopUsers(), LivePKUserListBean.class);
|
||||||
|
|
||||||
|
@ -90,12 +90,21 @@ public class LiveTextRender {
|
|||||||
String chatMsg = bean.getContent();
|
String chatMsg = bean.getContent();
|
||||||
int userNiceNameIndex = chatMsg.indexOf(bean.getUserNiceName());
|
int userNiceNameIndex = chatMsg.indexOf(bean.getUserNiceName());
|
||||||
int userNiceNameSize = bean.getUserNiceName().length();
|
int userNiceNameSize = bean.getUserNiceName().length();
|
||||||
int giftNameIndex = chatMsg.indexOf(bean.getGiftName());
|
int giftNameIndex = -1;
|
||||||
int giftNameSize = bean.getGiftName().length();
|
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();
|
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||||
builder.append(chatMsg);
|
builder.append(chatMsg);
|
||||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#78FEFF")), userNiceNameIndex, userNiceNameIndex + userNiceNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#78FEFF")), userNiceNameIndex, userNiceNameIndex + userNiceNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
if (giftNameIndex != -1) {
|
||||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF86C")), giftNameIndex, giftNameIndex + giftNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#FFF86C")), giftNameIndex, giftNameIndex + giftNameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
}
|
||||||
textView.setText(builder);
|
textView.setText(builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,8 +1203,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
}
|
}
|
||||||
//插入盲盒礼物消息
|
//插入盲盒礼物消息
|
||||||
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
bean.getLiveChatBean().setType(LiveChatBean.BLIND_BOX);
|
||||||
bean.getLiveChatBean().setContent(event.getGiftMsg());
|
bean.getLiveChatBean().setContent(WordUtil.isNewZh()?event.getGiftMsg():event.getGiftMsgen());
|
||||||
bean.getLiveChatBean().setGiftName(event.getGiftname());
|
bean.getLiveChatBean().setGiftName(WordUtil.isNewZh()?event.getGiftname():event.getGiftname_en());
|
||||||
bean.getLiveChatBean().setUserNiceName(event.getUserNiceName());
|
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