mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-22 18:47:11 -04:00
- Rewrite to input bridge v3
- Language switcher: fix crash on select the final item.
This commit is contained in:
@@ -234,12 +234,13 @@ public class PojavLoginActivity extends AppCompatActivity
|
||||
if (position == 0) {
|
||||
locale = Locale.getDefault();
|
||||
} else {
|
||||
locale = Locale.getAvailableLocales()[position + 1];
|
||||
locale = Locale.getAvailableLocales()[position - 1];
|
||||
}
|
||||
Locale.setDefault(locale);
|
||||
Configuration config = new Configuration();
|
||||
config.locale = locale;
|
||||
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());
|
||||
config.setLocale(locale);
|
||||
// TODO replace deprecated
|
||||
getResources().updateConfiguration(config, getResources().getDisplayMetrics());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user