|
@ -33,7 +33,7 @@ import androidx.appcompat.app.AppCompatActivity; |
|
|
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener { |
|
|
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener { |
|
|
@Override |
|
|
@Override |
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
Log.i(Helper.TAG, "Create " + this.getClass().getName()); |
|
|
|
|
|
|
|
|
Log.i(Helper.TAG, "Create " + this.getClass().getName() + " version=" + BuildConfig.VERSION_NAME); |
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); |
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); |
|
|
String theme = prefs.getString("theme", "light"); |
|
|
String theme = prefs.getString("theme", "light"); |
|
|
setTheme("light".equals(theme) ? R.style.AppThemeLight : R.style.AppThemeDark); |
|
|
setTheme("light".equals(theme) ? R.style.AppThemeLight : R.style.AppThemeDark); |
|
|