aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-06-02 19:56:48 -0700
committerScott Jackson <daneren2005@gmail.com>2014-06-02 19:56:48 -0700
commitdee8e1f78d565110b6fb80d82ab360f04ad83c70 (patch)
tree67f09c04ac5aaf4e9a32047342ce9823f6e1d6e8
parente9f4e0430cf96a21958e986c998f2ad47375275d (diff)
downloaddsub-dee8e1f78d565110b6fb80d82ab360f04ad83c70.tar.gz
dsub-dee8e1f78d565110b6fb80d82ab360f04ad83c70.tar.bz2
dsub-dee8e1f78d565110b6fb80d82ab360f04ad83c70.zip
#352 Make sure to update language from settings activity as well
-rw-r--r--src/github/daneren2005/dsub/activity/SettingsActivity.java9
1 files changed, 9 insertions, 0 deletions
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) {