mirror of
https://github.com/xdsopl/robot36.git
synced 2025-12-06 07:12:07 +01:00
use system language as default
This commit is contained in:
parent
6e8a524416
commit
0e863e6304
|
|
@ -377,7 +377,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
final int defaultSampleRate = 44100;
|
final int defaultSampleRate = 44100;
|
||||||
final int defaultChannelSelect = 0;
|
final int defaultChannelSelect = 0;
|
||||||
final int defaultAudioSource = MediaRecorder.AudioSource.MIC;
|
final int defaultAudioSource = MediaRecorder.AudioSource.MIC;
|
||||||
final String defaultLanguage = "en-US";
|
final String defaultLanguage = "system";
|
||||||
if (state == null) {
|
if (state == null) {
|
||||||
SharedPreferences pref = getPreferences(Context.MODE_PRIVATE);
|
SharedPreferences pref = getPreferences(Context.MODE_PRIVATE);
|
||||||
AppCompatDelegate.setDefaultNightMode(pref.getInt("nightMode", AppCompatDelegate.getDefaultNightMode()));
|
AppCompatDelegate.setDefaultNightMode(pref.getInt("nightMode", AppCompatDelegate.getDefaultNightMode()));
|
||||||
|
|
@ -615,7 +615,8 @@ public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private void setLanguage(String language) {
|
private void setLanguage(String language) {
|
||||||
this.language = language;
|
this.language = language;
|
||||||
AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags(language));
|
if (!language.equals("system"))
|
||||||
|
AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags(language));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void storeScope() {
|
private void storeScope() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue