Fixed main theme

pull/157/head
M66B 5 years ago
parent 2c7529ab1c
commit 8a63e3e269

@ -72,6 +72,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
this.contacts = hasPermission(Manifest.permission.READ_CONTACTS);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (!this.getClass().equals(ActivityMain.class)) {
String theme = prefs.getString("theme", null);
if ("system".equals(theme)) {
int uiMode = getResources().getConfiguration().uiMode;
@ -83,6 +85,7 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
setTheme(R.style.AppThemeDark);
else if ("black".equals(theme))
setTheme(R.style.AppThemeBlack);
}
prefs.registerOnSharedPreferenceChangeListener(this);

Loading…
Cancel
Save