From bfa7de6fde76821b8b7dfc2a69903b696837eb66 Mon Sep 17 00:00:00 2001 From: Bastian <8929967+Kaiserdragon2@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:14:31 +0200 Subject: [PATCH] Fix depreciated api usage --- app/build.gradle | 4 ++-- .../de/kaiserdragon/iconrequest/SettingActivity.java | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b0be992..1b450ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId 'de.kaiserdragon.iconrequest' minSdkVersion 23 targetSdk 35 - versionName '2.5.3' - versionCode 25 + versionName '2.5.4' + versionCode 26 } buildTypes { diff --git a/app/src/main/java/de/kaiserdragon/iconrequest/SettingActivity.java b/app/src/main/java/de/kaiserdragon/iconrequest/SettingActivity.java index 2c4d24e..e8bd104 100644 --- a/app/src/main/java/de/kaiserdragon/iconrequest/SettingActivity.java +++ b/app/src/main/java/de/kaiserdragon/iconrequest/SettingActivity.java @@ -90,22 +90,22 @@ public void painThemeButton(){ resetButtonColors(); switch (SettingsHelper.loadData("DarkModeState", this)) { case -1: - setDefault.setBackgroundColor(getResources().getColor(R.color.secondary)); + setDefault.setBackgroundColor(getResources().getColor(R.color.secondary, null)); break; case 1: - setLight.setBackgroundColor(getResources().getColor(R.color.secondary)); + setLight.setBackgroundColor(getResources().getColor(R.color.secondary,null)); break; case 2: - setDark.setBackgroundColor(getResources().getColor(R.color.secondary)); + setDark.setBackgroundColor(getResources().getColor(R.color.secondary,null)); break; } } // Method to reset all button colors to default private void resetButtonColors() { - setDefault.setBackgroundColor(getResources().getColor(R.color.primary)); - setDark.setBackgroundColor(getResources().getColor(R.color.primary)); - setLight.setBackgroundColor(getResources().getColor(R.color.primary)); + setDefault.setBackgroundColor(getResources().getColor(R.color.primary,null)); + setDark.setBackgroundColor(getResources().getColor(R.color.primary,null)); + setLight.setBackgroundColor(getResources().getColor(R.color.primary,null)); } }