From dee8e1f78d565110b6fb80d82ab360f04ad83c70 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 2 Jun 2014 19:56:48 -0700 Subject: #352 Make sure to update language from settings activity as well --- src/github/daneren2005/dsub/activity/SettingsActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/activity/SettingsActivity.java b/src/github/daneren2005/dsub/activity/SettingsActivity.java index d62c3769..e8f6fc5b 100644 --- a/src/github/daneren2005/dsub/activity/SettingsActivity.java +++ b/src/github/daneren2005/dsub/activity/SettingsActivity.java @@ -25,6 +25,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.content.res.Configuration; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -55,6 +56,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.URL; import java.util.LinkedHashMap; +import java.util.Locale; import java.util.Map; public class SettingsActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener { @@ -475,6 +477,13 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer } else { setTheme(R.style.Theme_DSub_Holo); } + + SharedPreferences prefs = Util.getPreferences(this); + if(prefs.getBoolean(Constants.PREFERENCES_KEY_OVERRIDE_SYSTEM_LANGUAGE, false)) { + Configuration config = new Configuration(); + config.locale = Locale.ENGLISH; + getResources().updateConfiguration(config,getResources().getDisplayMetrics()); + } } private void setHideMedia(boolean hide) { -- cgit v1.2.3