diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java
index fee86a9ea..d1c98c264 100644
--- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java
+++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java
@@ -152,7 +152,7 @@ public class SudGameListPopup extends BottomPopupView {
}
});
mRefreshView.initData();
- mRefreshView.setEmptyLayoutId(R.layout.sud_no_data);
+ mRefreshView.setEmptyLayoutId(R.layout.sud_no_data1);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.random_start), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
@@ -168,6 +168,12 @@ public class SudGameListPopup extends BottomPopupView {
.asCustom(new LiveSudGamePopup(getContext(), data))
.show();
dialog.dismiss();
+ }else {
+ if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ ToastUtil.show("当前没有可加入的房间");
+ } else {
+ ToastUtil.show("There are currently no rooms to join");
+ }
}
}
diff --git a/common/src/main/java/com/yunbao/common/views/LiveNewWishGiftPopup.java b/common/src/main/java/com/yunbao/common/views/LiveNewWishGiftPopup.java
index 56d53dc8f..f307d76f1 100644
--- a/common/src/main/java/com/yunbao/common/views/LiveNewWishGiftPopup.java
+++ b/common/src/main/java/com/yunbao/common/views/LiveNewWishGiftPopup.java
@@ -2,6 +2,7 @@ package com.yunbao.common.views;
import android.graphics.Color;
import android.util.Log;
+import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -88,7 +89,7 @@ public class LiveNewWishGiftPopup extends BottomPopupView {
for (int i = 0; i < 3; i++) {
TextView wishItem = (TextView) LayoutInflater.from(getContext())
.inflate(R.layout.view_tablaout_wish_item, null, false);
-
+ wishItem.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);
switch (i) {
case 0:
wishItem.setText(R.string.live_gift);
@@ -112,7 +113,7 @@ public class LiveNewWishGiftPopup extends BottomPopupView {
View tab = tabs.getChildAt(i);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) tab.getLayoutParams();
layoutParams.setMarginEnd(DpUtil.dp2px(4));
- layoutParams.width = DpUtil.dp2px(58);
+ layoutParams.width = DpUtil.dp2px(90);
tab.setLayoutParams(layoutParams);
wishTab.requestLayout();
}
diff --git a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java
index a4af32be8..a6ea6fc22 100644
--- a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java
+++ b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java
@@ -202,7 +202,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
ViewList.add(zhouXinFragment);
ViewList.add(lunarWishFragment);
ViewList.add(seasonalWishFragment);
- if (TextUtils.equals(ct, "zh")) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
wishListTop.setBackgroundResource(R.drawable.wish_list_day_zh);
} else {
wishListTop.setBackgroundResource(R.drawable.wish_list_day_en);
@@ -254,7 +254,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
type = tab.getId() + 1;
switch (type) {
case 1:
- if (TextUtils.equals(ct, "zh")) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
wishListTop.setBackgroundResource(R.drawable.wish_list_day_zh);
} else {
wishListTop.setBackgroundResource(R.drawable.wish_list_day_en);
@@ -262,7 +262,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
replacementWish.setText(R.string.replacement_wish_day);
break;
case 2:
- if (TextUtils.equals(ct, "zh")) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
wishListTop.setBackgroundResource(R.drawable.wish_list_week_zh);
} else {
wishListTop.setBackgroundResource(R.drawable.wish_list_week_en);
@@ -270,7 +270,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
replacementWish.setText(R.string.replacement_wish_zhou);
break;
case 3:
- if (TextUtils.equals(ct, "zh")) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
wishListTop.setBackgroundResource(R.drawable.wish_list_lunar_zh);
} else {
wishListTop.setBackgroundResource(R.drawable.wish_list_lunar_en);
@@ -278,7 +278,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
replacementWish.setText(R.string.replacement_wish_lunar);
break;
case 4:
- if (TextUtils.equals(ct, "zh")) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
wishListTop.setBackgroundResource(R.drawable.wish_list_seasonal_zh);
} else {
wishListTop.setBackgroundResource(R.drawable.wish_list_seasonal_en);
diff --git a/common/src/main/res/layout/dialog_live_new_wish_list.xml b/common/src/main/res/layout/dialog_live_new_wish_list.xml
index f044c166a..f11c4c827 100644
--- a/common/src/main/res/layout/dialog_live_new_wish_list.xml
+++ b/common/src/main/res/layout/dialog_live_new_wish_list.xml
@@ -36,7 +36,7 @@
diff --git a/common/src/main/res/layout/hint_custom_popup.xml b/common/src/main/res/layout/hint_custom_popup.xml
index 1c1d9433e..fae545ee5 100644
--- a/common/src/main/res/layout/hint_custom_popup.xml
+++ b/common/src/main/res/layout/hint_custom_popup.xml
@@ -1,8 +1,8 @@
diff --git a/common/src/main/res/layout/sud_no_data1.xml b/common/src/main/res/layout/sud_no_data1.xml
new file mode 100644
index 000000000..2ac817d09
--- /dev/null
+++ b/common/src/main/res/layout/sud_no_data1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml
index 2f5fadb4b..35623d033 100644
--- a/common/src/main/res/values-en-rUS/string.xml
+++ b/common/src/main/res/values-en-rUS/string.xml
@@ -1104,7 +1104,7 @@ Limited ride And limited avatar frame
Reset Your: Day
Reset Wish: Week
Reset Wish: Month
- Reset Wish: Month
+ Reset Wish: seasonal
Is reset confirmed
Resetting will empty the wish list, \nregardless of whether the wish is completed or not
Confirm Reset
@@ -1354,5 +1354,11 @@ Limited ride And limited avatar frame
Whether to enter the live broadcast room
No,only enter the game
There are currently no rooms to join
+ Turntable prank switch
+ After closing, all users will not be able to see the contents of the turntable
+ The turntable consumes diamonds every time
+ Minimum requirement of 1000 diamonds
+ Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words
+ You have not set up the prank content yet
diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml
index 962faba11..8394da1c6 100644
--- a/common/src/main/res/values-zh-rHK/strings.xml
+++ b/common/src/main/res/values-zh-rHK/strings.xml
@@ -1351,4 +1351,10 @@
是否同步進入主播直播間
否,僅進入遊戲
当前没有可加入的房间
+ 轉盤整蠱開關
+ 關閉後所有用戶將無法看到轉盤內容
+ 轉盤每次消耗鑽石
+ 最少1,000鑽石起步
+ 填寫整蠱內容,最少2個字,最多10個字
+ 您目前還未設置整蠱內容
diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml
index 53b06b654..ac8085ae4 100644
--- a/common/src/main/res/values-zh-rTW/strings.xml
+++ b/common/src/main/res/values-zh-rTW/strings.xml
@@ -1350,4 +1350,10 @@
是否同步進入主播直播間
否,僅進入遊戲
当前没有可加入的房间
+ 轉盤整蠱開關
+ 關閉後所有用戶將無法看到轉盤內容
+ 轉盤每次消耗鑽石
+ 最少1,000鑽石起步
+ 填寫整蠱內容,最少2個字,最多10個字
+ 您目前還未設置整蠱內容
diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index f4d0e5846..c80ac437b 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -1350,5 +1350,11 @@
是否同步進入主播直播間
否,僅進入遊戲
当前没有可加入的房间
+ 轉盤整蠱開關
+ 關閉後所有用戶將無法看到轉盤內容
+ 轉盤每次消耗鑽石
+ 最少1,000鑽石起步
+ 填寫整蠱內容,最少2個字,最多10個字
+ 您目前還未設置整蠱內容
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 47df7b844..2bf68cb59 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -1104,7 +1104,7 @@ Limited ride And limited avatar frame
Reset Your: Day
Reset Wish: Week
Reset Wish: Month
- Reset Wish: Month
+ Reset Wish: seasonal
Is reset confirmed
Resetting will empty the wish list, \nregardless of whether the wish is completed or not
Confirm Reset
@@ -1357,4 +1357,10 @@ Limited ride And limited avatar frame
Whether to enter the live broadcast room
No,only enter the game
There are currently no rooms to join
+ Turntable prank switch
+ After closing, all users will not be able to see the contents of the turntable
+ The turntable consumes diamonds every time
+ Minimum requirement of 1000 diamonds
+ Fill in the content of the prank,Fill in a minimum of 2 words and a maximum of 10 words
+ You have not set up the prank content yet
diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java
index 19b8ec9de..6a1aac149 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java
@@ -1289,9 +1289,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
//粉絲團粉絲團
//不是粉絲
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
- bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
+ bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
} else {
- bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
+ bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0));
}
bundle.putString("liveUid", mLiveUid);
bundle.putString("anchorName", mAncherName);
diff --git a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java
index a51c2577c..a00862fad 100644
--- a/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java
+++ b/live/src/main/java/com/yunbao/live/adapter/LivePrankRecyclerAdapter.java
@@ -8,10 +8,14 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
import com.yunbao.common.bean.PrankGiftBean;
import com.yunbao.common.bean.PrankTurntableBean;
import com.yunbao.common.glide.ImgLoader;
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;
@@ -19,9 +23,7 @@ import com.yunbao.live.R;
import java.util.ArrayList;
import java.util.List;
-
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
+import java.util.Locale;
public class LivePrankRecyclerAdapter extends RecyclerView.Adapter {
public static final int TYPE_TURNTABLE = 0;
@@ -88,7 +90,7 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter {
- DialogUitl.showSimpleInputDialog(mContext, "填寫整蠱內容", DialogUitl.INPUT_TYPE_TEXT, 10, new DialogUitl.SimpleCallback() {
- @Override
- public void onConfirmClick(Dialog dialog, String content) {
- if(WordUtil.isSpecialChar(content)){
- ToastUtil.show("整蠱內容不能包含特殊字符");
- return;
- }
- if (content.length() >= 2 && content.length() <= 10) {
- context.setText(content);
- onItemClickListener.onItemClick(content, ((PrankTurntableBean)list.get((Integer) itemView.getTag())).getId());
- ((PrankTurntableBean)list.get((Integer) itemView.getTag())).setContext(content);
- dialog.dismiss();
- } /*else if (content.length() == 0) {
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ DialogUitl.showSimpleInputDialog(mContext, "填寫整蠱內容", DialogUitl.INPUT_TYPE_TEXT, 10, new DialogUitl.SimpleCallback() {
+ @Override
+ public void onConfirmClick(Dialog dialog, String content) {
+ if (WordUtil.isSpecialChar(content)) {
+ ToastUtil.show("整蠱內容不能包含特殊字符");
+ return;
+ }
+ if (content.length() >= 2 && content.length() <= 10) {
+ context.setText(content);
+ onItemClickListener.onItemClick(content, ((PrankTurntableBean) list.get((Integer) itemView.getTag())).getId());
+ ((PrankTurntableBean) list.get((Integer) itemView.getTag())).setContext(content);
+ dialog.dismiss();
+ } /*else if (content.length() == 0) {
context.setText("");
onItemClickListener.onItemClick(content, ((PrankTurntableBean)list.get((Integer) itemView.getTag())).getId());
dialog.dismiss();
- } */else {
- ToastUtil.show("最少2個字,最多10個字");
+ } */ else {
+ ToastUtil.show("最少2個字,最多10個字");
+ }
}
- }
- });
+ });
+ } else {
+ DialogUitl.showSimpleInputDialog(mContext, "Fill in the content of the prank", DialogUitl.INPUT_TYPE_TEXT, 10, new DialogUitl.SimpleCallback() {
+ @Override
+ public void onConfirmClick(Dialog dialog, String content) {
+ if (WordUtil.isSpecialChar(content)) {
+ ToastUtil.show("The prank content cannot contain special characters");
+ return;
+ }
+ if (content.length() >= 2 && content.length() <= 10) {
+ context.setText(content);
+ onItemClickListener.onItemClick(content, ((PrankTurntableBean) list.get((Integer) itemView.getTag())).getId());
+ ((PrankTurntableBean) list.get((Integer) itemView.getTag())).setContext(content);
+ dialog.dismiss();
+ } /*else if (content.length() == 0) {
+ context.setText("");
+ onItemClickListener.onItemClick(content, ((PrankTurntableBean)list.get((Integer) itemView.getTag())).getId());
+ dialog.dismiss();
+ } */ else {
+ ToastUtil.show("Fill in a minimum of 2 words and a maximum of 10 words");
+ }
+ }
+ });
+ }
+
});
}
public void setDate(PrankTurntableBean bean, int position) {
- title.setText("轉盤" + getChineseNum(bean.getId()) + "號位");
- probability.setText(getProbability(bean.getId()));
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ title.setText("轉盤" + getChineseNum(bean.getId()) + "號位");
+ } else {
+ title.setText("Turntable" + getChineseNum(bean.getId()));
+ }
+
+ probability.setText(getProbability(bean.getId(), mContext));
context.setText(bean.getContext());
itemView.setTag(position);
}
@@ -194,21 +226,39 @@ public class LivePrankRecyclerAdapter extends RecyclerView.Adapter {
if ((int) view.getTag() == 1) {
if (giftBeans != null && giftBeans.size() >= 20) {
- ToastUtil.show("可添加禮物數量達到上限");
+
+ if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ ToastUtil.show("可添加禮物數量達到上限");
+ }else {
+ ToastUtil.show("The maximum number of gifts that can be added has been ");
+ }
+
+
return;
}
- GiftPopDialog dialog = new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
+ GiftPopDialog dialog = new GiftPopDialog(mContext, new GiftPopDialog.ActionListener() {
@Override
public void onSelectGift(PrankGiftBean bean) {
@@ -167,8 +174,14 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
private void initTab() {
TabLayout.Tab turntable = mTabLayout.newTab();
TabLayout.Tab gift = mTabLayout.newTab();
- turntable.setText("轉盤整蠱");
- gift.setText("禮物整蠱");
+ if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ turntable.setText("轉盤整蠱");
+ gift.setText("禮物整蠱");
+ }else {
+ turntable.setText("Turntable prank");
+ gift.setText("Gift prank");
+ }
+
turntable.setTag(0);
gift.setTag(1);
mTabLayout.addTab(turntable);
@@ -185,14 +198,24 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
mGiftNotDate.setVisibility(View.GONE);
recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_TURNTABLE);
mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save);
- mPrankBtn.setText("保存設置");
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ mPrankBtn.setText("保存設置");
+ } else {
+ mPrankBtn.setText("Save Settings");
+ }
+
mPrankBtn.setTag(0);
recyclerAdapter.clearList();
initTurntableData();
} else {
mTurntableConfigLayout.setVisibility(View.GONE);
mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_gift_set);
- mPrankBtn.setText("添加禮物");
+
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ mPrankBtn.setText("添加禮物");
+ } else {
+ mPrankBtn.setText("Add gift");
+ }
mPrankBtn.setTag(1);
recyclerAdapter.clearList();
mGiftNotDate.setVisibility(View.VISIBLE);
@@ -217,7 +240,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
@Override
public void onSuccess(PrankHttpTurntableBean data) {
setDate(data);
- mCoinTextView.setText(data.getCoin()+"");
+ mCoinTextView.setText(data.getCoin() + "");
}
@Override
@@ -260,7 +283,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
@Override
public void onError(String error) {
- ToastUtil.show( R.string.net_error);
+ ToastUtil.show(R.string.net_error);
}
});
}
@@ -296,8 +319,13 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
}
private void setPrankConfig() {
- if(StringUtil.isEmpty(bean.getTurntable1(),bean.getTurntable2(), bean.getTurntable3(),bean.getTurntable4(),bean.getTurntable5(),bean.getTurntable6())){
- ToastUtil.show("保存失败:所有转盘位置必填" );
+ if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) {
+
+ if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
+ ToastUtil.show("保存失败:所有转盘位置必填");
+ } else {
+ ToastUtil.show("Save failed: all turntable positions must be filled in");
+ }
return;
}
LiveNetManager.get(mContext).setAnchorPrankTurntable(
@@ -313,12 +341,21 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
new HttpCallback