From 11bc23418e8544f1a7bc4239bb5f8ab59df256f7 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 24 Apr 2023 16:03:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=94=80=E8=B4=A6=E5=8F=B7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../phonelive/activity/LauncherActivity.java | 11 ++++ config.gradle | 50 +++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java index 31a5dfd4d..5251deee9 100644 --- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java +++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java @@ -4,6 +4,8 @@ package com.shayu.phonelive.activity; import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.content.res.Configuration; +import android.content.res.Resources; import android.os.Build; import android.os.Bundle; import android.os.Handler; @@ -102,6 +104,15 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL private int mVideoLastProgress; private boolean mForward; + @Override + public Resources getResources() { + Resources res = super.getResources(); + Configuration config = new Configuration(); + config.setToDefaults(); + config.locale = IMLoginManager.get(this).getLocaleLanguage(); + res.updateConfiguration(config, res.getDisplayMetrics()); + return res; + } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS); diff --git a/config.gradle b/config.gradle index 367862767..b6984158a 100644 --- a/config.gradle +++ b/config.gradle @@ -26,5 +26,55 @@ ext { isGooglePlay : true, //是否上报异常日志 isUploadLog : true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ] } \ No newline at end of file