package net.somethingdreadful.MAL;

import android.content.res.Configuration;

import org.holoeverywhere.ThemeManager;
import org.holoeverywhere.app.Application;

import java.util.Locale;

public class Theme extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        PrefManager Prefs = new PrefManager(getApplicationContext());
        Locale locale = Prefs.getLocale();

        // apply it until the app remains cached
        Locale.setDefault(locale);
        Configuration newConfig = new Configuration();
        newConfig.locale = locale;
        getBaseContext().getResources().updateConfiguration(newConfig, getBaseContext().getResources().getDisplayMetrics());
    }

    static {
        ThemeManager.setDefaultTheme(ThemeManager.MIXED);
    }
}

@@ -223,16 +223,37 @@
 ation %7B%0A
+%0A    Locale locale;%0A%0A
     @Ove
@@ -387,31 +387,24 @@
 ));%0A        
-Locale 
 locale = Pre
@@ -594,16 +594,16 @@
 locale;%0A
-
         
@@ -726,16 +726,442 @@
 %0A    %7D%0A%0A
+    @Override%0A    public void onConfigurationChanged(Configuration newConfig) %7B%0A        super.onConfigurationChanged(newConfig);%0A        // apply it until the app remains cached%0A        Locale.setDefault(locale);%0A        Configuration Config = new Configuration();%0A        Config.locale = locale;%0A        getBaseContext().getResources().updateConfiguration(Config, getBaseContext().getResources().getDisplayMetrics());%0A    %7D%0A%0A
     stat

Fix language when the device has been rotated (Language)