机器人语言设置完成

This commit is contained in:
ningwenqiang 2024-09-27 16:49:08 +08:00
parent 51caa11c07
commit 9454b5407a
4 changed files with 16 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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"

View File

@ -1450,4 +1450,6 @@ Limited ride And limited avatar frame</string>
<string name="open_vip_live">openVip</string>
<string name="ai_anguage_settings">Language Settings</string>
<string name="chang_langue_tips">After this setting, all robot languages will be covered by translation, please confirm whether this operation is completed!</string>
</resources>