diff --git a/common/src/main/java/com/yunbao/common/utils/DialogUitl.java b/common/src/main/java/com/yunbao/common/utils/DialogUitl.java index c2f19cd3f..eb050bed1 100644 --- a/common/src/main/java/com/yunbao/common/utils/DialogUitl.java +++ b/common/src/main/java/com/yunbao/common/utils/DialogUitl.java @@ -168,6 +168,15 @@ public class DialogUitl { showSimpleDialog(context, content, false, callback); } + public static void showSimpleDialogString(Context context, String content,String confirmString, SimpleCallback callback) { + if (context instanceof Activity) { + if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) { + return; + } + } + new Builder(context).setTitle(null).setContent(content).setCancelable(false).setClickCallback(callback).setConfirmString(confirmString).build().show(); + } + public static void showSimpleDialog(Context context, String content, boolean cancelable, SimpleCallback callback) { showSimpleDialog(context, null, content, cancelable, callback); } diff --git a/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java index abdbdad36..86c23be63 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveRobotSettingCustomPopup.java @@ -140,7 +140,7 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View private void ShowChangeLanguagePopup(int i) { - DialogUitl.showSimpleDialog(getContext(), getContext().getString(R.string.chang_langue_tips), new DialogUitl.SimpleCallback() { + DialogUitl.showSimpleDialogString(getContext(), getContext().getString(R.string.chang_langue_tips), getContext().getString(R.string.aristocrat_determine) ,new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { LiveNetManager.get(getContext()) @@ -152,8 +152,8 @@ public class LiveRobotSettingCustomPopup extends BottomPopupView implements View languageEnImgView.setSelected(false); lastLanguage = 0; } else { - languageZhImgView.setSelected(true); - languageEnImgView.setSelected(false); + languageZhImgView.setSelected(false); + languageEnImgView.setSelected(true); lastLanguage = 1; } } diff --git a/common/src/main/res/layout/dialog_live_robot_setting.xml b/common/src/main/res/layout/dialog_live_robot_setting.xml index 5f8d1dc5f..7ad434e07 100644 --- a/common/src/main/res/layout/dialog_live_robot_setting.xml +++ b/common/src/main/res/layout/dialog_live_robot_setting.xml @@ -77,7 +77,7 @@ android:layout_height="match_parent" android:gravity="center" android:layout_gravity="center_vertical" - android:paddingStart="5dp" + android:paddingStart="2dp" android:paddingEnd="5dp" android:text="中文" android:textColor="#FFF" @@ -98,7 +98,7 @@ android:layout_height="match_parent" android:gravity="center" android:layout_gravity="center_vertical" - android:paddingStart="5dp" + android:paddingStart="2dp" android:paddingEnd="5dp" android:text="English" android:layout_marginEnd="10dp" diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index d2e9b4b3d..a1bda6cb1 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1450,4 +1450,6 @@ Limited ride And limited avatar frame openVip Language Settings After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed! + +