import android.os.Build;
import net.ktnx.mobileledger.utils.Globals;
+import net.ktnx.mobileledger.utils.MLDB;
public class MobileLedgerApplication extends Application {
public void onCreate() {
super.onCreate();
updateColorValues();
+ MLDB.init(this);
+ }
+ @Override
+ public void onTerminate() {
+ MLDB.done();
+ super.onTerminate();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
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);
}
}
}