Skip to content

Commit bfa7de6

Browse files
committed
Fix depreciated api usage
1 parent be48834 commit bfa7de6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId 'de.kaiserdragon.iconrequest'
99
minSdkVersion 23
1010
targetSdk 35
11-
versionName '2.5.3'
12-
versionCode 25
11+
versionName '2.5.4'
12+
versionCode 26
1313
}
1414

1515
buildTypes {

app/src/main/java/de/kaiserdragon/iconrequest/SettingActivity.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,22 @@ public void painThemeButton(){
9090
resetButtonColors();
9191
switch (SettingsHelper.loadData("DarkModeState", this)) {
9292
case -1:
93-
setDefault.setBackgroundColor(getResources().getColor(R.color.secondary));
93+
setDefault.setBackgroundColor(getResources().getColor(R.color.secondary, null));
9494
break;
9595
case 1:
96-
setLight.setBackgroundColor(getResources().getColor(R.color.secondary));
96+
setLight.setBackgroundColor(getResources().getColor(R.color.secondary,null));
9797
break;
9898
case 2:
99-
setDark.setBackgroundColor(getResources().getColor(R.color.secondary));
99+
setDark.setBackgroundColor(getResources().getColor(R.color.secondary,null));
100100
break;
101101
}
102102

103103
}
104104
// Method to reset all button colors to default
105105
private void resetButtonColors() {
106-
setDefault.setBackgroundColor(getResources().getColor(R.color.primary));
107-
setDark.setBackgroundColor(getResources().getColor(R.color.primary));
108-
setLight.setBackgroundColor(getResources().getColor(R.color.primary));
106+
setDefault.setBackgroundColor(getResources().getColor(R.color.primary,null));
107+
setDark.setBackgroundColor(getResources().getColor(R.color.primary,null));
108+
setLight.setBackgroundColor(getResources().getColor(R.color.primary,null));
109109
}
110110
}
111111

0 commit comments

Comments
 (0)