mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Fix theme and icon color on startup
This commit is contained in:
parent
ecc941dc11
commit
b3ae8b1fff
7 changed files with 20 additions and 4 deletions
|
|
@ -2,6 +2,9 @@ package com.cappielloantonio.play;
|
|||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.cappielloantonio.play.helper.ThemeHelper;
|
||||
import com.cappielloantonio.play.util.PreferenceUtil;
|
||||
|
|
@ -24,7 +27,9 @@ public class App extends Application {
|
|||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
ThemeHelper.applyTheme(PreferenceUtil.getInstance(getApplicationContext()).getTheme());
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||
String themePref = sharedPreferences.getString("themePref", ThemeHelper.DEFAULT_MODE);
|
||||
ThemeHelper.applyTheme(themePref);
|
||||
}
|
||||
|
||||
public static App getInstance() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue