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