X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2FMobileLedgerApplication.java;h=f4a7215992face74b717ee283979f970bcfdcd48;hp=39d7e542d8f8a201d37f83e360b5153d41b72f7a;hb=a1d55154e1c9fb72fcd60de31d6e64e8d046f96d;hpb=c7b957ab880ff947ef90e70e41c7bc1c19a1caa3 diff --git a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java index 39d7e542..f4a72159 100644 --- a/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java +++ b/app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java @@ -23,6 +23,7 @@ import android.content.res.Resources; import android.os.Build; import net.ktnx.mobileledger.utils.Globals; +import net.ktnx.mobileledger.utils.MLDB; public class MobileLedgerApplication extends Application { @@ -30,6 +31,7 @@ public class MobileLedgerApplication extends Application { public void onCreate() { super.onCreate(); updateColorValues(); + MLDB.init(this); } @Override public void onConfigurationChanged(Configuration newConfig) { @@ -42,10 +44,14 @@ public class MobileLedgerApplication extends Application { Resources.Theme theme = getTheme(); Globals.table_row_odd_bg = rm.getColor(R.color.table_row_odd_bg, theme); Globals.table_row_even_bg = rm.getColor(R.color.table_row_even_bg, theme); + Globals.primaryDark = rm.getColor(R.color.design_default_color_primary_dark, theme); + Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text, theme); } else { Globals.table_row_odd_bg = rm.getColor(R.color.table_row_odd_bg); Globals.table_row_even_bg = rm.getColor(R.color.table_row_even_bg); + Globals.primaryDark = rm.getColor(R.color.design_default_color_primary_dark); + Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text); } } }