调整中英文

调整开播频道接口
This commit is contained in:
2023-09-02 11:16:01 +08:00
parent 2e907bc1ed
commit 57bda40a82
36 changed files with 274 additions and 86 deletions

View File

@@ -1,6 +1,7 @@
package com.yunbao.common.bean;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.SerializedName;
/**
* Created by cxf on 2018/9/25.
@@ -16,6 +17,8 @@ public class LiveClassBean {
private boolean checked;
private String chinese;
private String english;
@SerializedName("channel_show")
private int channel_show;
public String getChinese() {
return chinese;
@@ -92,4 +95,12 @@ public class LiveClassBean {
public void setChecked(boolean checked) {
this.checked = checked;
}
public int getChannel_show() {
return channel_show;
}
public void setChannel_show(int channel_show) {
this.channel_show = channel_show;
}
}

View File

@@ -134,7 +134,11 @@ public class MicStatusManager {
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
MicStatusManager.getInstance().clear();
ToastUtil.show("已成功退出語音連麥");
if(WordUtil.isNewZh()) {
ToastUtil.show("已成功退出語音連麥");
}else{
ToastUtil.show("You have successfully exited the voice connection");
}
}
});
}
@@ -193,7 +197,11 @@ public class MicStatusManager {
* 显示退出连麦状态对话框
*/
public void showDownMicDialog(Context context) {
DialogUitl.showSimpleDialog(context, "當前正在連麥中", new DialogUitl.SimpleCallback() {
String content="當前正在連麥中";
if(!WordUtil.isNewZh()){
content="Currently connecting the wheat";
}
DialogUitl.showSimpleDialog(context, content, new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
// downMic(); //不做下麦跳转

View File

@@ -1,5 +1,6 @@
package com.yunbao.common.utils;
import android.content.res.Configuration;
import android.content.res.Resources;
import com.yunbao.common.CommonAppContext;
@@ -31,8 +32,20 @@ public class WordUtil {
String language = locale.getLanguage();
return language.endsWith("zh");
}
public static boolean isNewZh(){
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
public static boolean isNewZh() {
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
}
public static String getNewString(int res) {
Configuration config = new Configuration();
Configuration tmp = sResources.getConfiguration();
config.setToDefaults();
config.locale = IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage();
sResources.updateConfiguration(config, sResources.getDisplayMetrics());
String str = sResources.getString(res);
sResources.updateConfiguration(tmp, sResources.getDisplayMetrics());
return str;
}
/**