]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/MobileLedgerApplication.java
no direct interface to ObservableList's value
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / MobileLedgerApplication.java
index 6971dec4bfe00884f2d4be91c3d8af803e11471f..836ea3a13cb6171f07ffca72dd932e938b8ca9b0 100644 (file)
@@ -1,18 +1,18 @@
 /*
  * Copyright © 2019 Damyan Ivanov.
- * This file is part of Mobile-Ledger.
- * Mobile-Ledger is free software: you can distribute it and/or modify it
+ * This file is part of MoLe.
+ * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your opinion), any later version.
  *
- * Mobile-Ledger is distributed in the hope that it will be useful,
+ * MoLe is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License terms for details.
  *
  * You should have received a copy of the GNU General Public License
- * along with Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
+ * along with MoLe. If not, see <https://www.gnu.org/licenses/>.
  */
 
 package net.ktnx.mobileledger;
@@ -21,7 +21,6 @@ import android.app.Application;
 import android.content.SharedPreferences;
 import android.content.res.Configuration;
 import android.content.res.Resources;
-import android.os.Build;
 import android.preference.PreferenceManager;
 
 import net.ktnx.mobileledger.model.Data;
@@ -35,7 +34,6 @@ public class MobileLedgerApplication extends Application {
     @Override
     public void onCreate() {
         super.onCreate();
-        updateColorValues();
         updateMonthNames();
         MLDB.init(this);
         SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(this);
@@ -57,23 +55,6 @@ public class MobileLedgerApplication extends Application {
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
-        updateColorValues();
         updateMonthNames();
     }
-    private void updateColorValues() {
-        Resources rm = getResources();
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-            Resources.Theme theme = getTheme();
-            Globals.tableRowDarkBG = rm.getColor(R.color.table_row_dark_bg, theme);
-            Globals.tableRowLightBG = rm.getColor(R.color.table_row_light_bg, theme);
-            Globals.primaryDark = rm.getColor(R.color.colorPrimaryDark, theme);
-            Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text, theme);
-        }
-        else {
-            Globals.tableRowDarkBG = rm.getColor(R.color.table_row_dark_bg);
-            Globals.tableRowLightBG = rm.getColor(R.color.table_row_light_bg);
-            Globals.primaryDark = rm.getColor(R.color.colorPrimaryDark);
-            Globals.defaultTextColor = rm.getColor(android.R.color.tab_indicator_text);
-        }
-    }
 }