Skip to content

Commit

Permalink
Fix depreciated api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiserdragon2 committed Oct 16, 2024
1 parent be48834 commit bfa7de6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit bfa7de6

Please sign in to comment.