mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 15:48:26 -04:00
Try to get language up and work
This commit is contained in:
parent
63d9d29a87
commit
746aeea4c5
@ -8,7 +8,7 @@ public class DisplayableLocale {
|
||||
private static Locale processStringLocale(String locale) {
|
||||
if (locale.contains("-")) {
|
||||
String[] split = locale.split("-");
|
||||
return new Locale(split[0], split[1]);
|
||||
return new Locale(split[0] /*, split[1] */);
|
||||
} else {
|
||||
return new Locale(locale);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
private SharedPreferences firstLaunchPrefs;
|
||||
|
||||
private boolean isSkipInit = false;
|
||||
private static boolean isSkipInit = false;
|
||||
|
||||
// private final String PREF_IS_DONOTSHOWAGAIN_WARN = "isWarnDoNotShowAgain";
|
||||
public static final String PREF_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
|
||||
@ -69,8 +69,6 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
firstLaunchPrefs = getSharedPreferences("pojav_extract", MODE_PRIVATE);
|
||||
new InitTask().execute(isSkipInit);
|
||||
|
||||
isSkipInit = true;
|
||||
}
|
||||
|
||||
private class InitTask extends AsyncTask<Boolean, String, Integer>{
|
||||
@ -280,6 +278,8 @@ public class PojavLoginActivity extends BaseActivity
|
||||
edit3.setEnabled(!p2);
|
||||
}
|
||||
});
|
||||
|
||||
isSkipInit = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,11 +19,13 @@ public class LocaleUtils {
|
||||
LauncherPreferences.loadPreferences();
|
||||
}
|
||||
|
||||
Locale locale;
|
||||
if (LauncherPreferences.PREF_LANGUAGE.equals("default")) {
|
||||
return context;
|
||||
locale = DEFAULT_LOCALE;
|
||||
} else {
|
||||
locale = new Locale(LauncherPreferences.PREF_LANGUAGE);
|
||||
}
|
||||
|
||||
Locale locale = new Locale(LauncherPreferences.PREF_LANGUAGE);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources res = context.getResources();
|
||||
|
Loading…
x
Reference in New Issue
Block a user