diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java b/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java index 49cd4200fa..063b59bf41 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java @@ -44,6 +44,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.constraintlayout.widget.Group; +import androidx.core.widget.TextViewCompat; import androidx.fragment.app.FragmentTransaction; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.preference.PreferenceManager; @@ -384,7 +385,7 @@ public class FragmentDialogJunk extends FragmentDialogBase { cbBlockDomain.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.twotone_warning_24, 0); cbBlockDomain.setCompoundDrawablePadding(dp6); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) - cbBlockDomain.setCompoundDrawableTintList(ColorStateList.valueOf(colorWarning)); + TextViewCompat.setCompoundDrawableTintList(cbBlockDomain, ColorStateList.valueOf(colorWarning)); } ibMore.setImageLevel(1); diff --git a/app/src/main/java/eu/faircode/email/FragmentMoveAsk.java b/app/src/main/java/eu/faircode/email/FragmentMoveAsk.java index 65ac5fc7ea..d991426048 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMoveAsk.java +++ b/app/src/main/java/eu/faircode/email/FragmentMoveAsk.java @@ -38,6 +38,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.core.content.ContextCompat; +import androidx.core.widget.TextViewCompat; import androidx.preference.PreferenceManager; import java.text.Collator; @@ -120,9 +121,9 @@ public class FragmentMoveAsk extends FragmentDialogBase { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (sourceColor != null) - tvSourceFolders.setCompoundDrawableTintList(ColorStateList.valueOf(sourceColor)); + TextViewCompat.setCompoundDrawableTintList(tvSourceFolders, ColorStateList.valueOf(sourceColor)); if (targetColor != null) - tvTargetFolders.setCompoundDrawableTintList(ColorStateList.valueOf(targetColor)); + TextViewCompat.setCompoundDrawableTintList(tvTargetFolders, ColorStateList.valueOf(targetColor)); } if (notagain != null) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index fa0e545fce..223df3a14d 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -65,6 +65,7 @@ import androidx.cardview.widget.CardView; import androidx.constraintlayout.widget.Group; import androidx.core.content.ContextCompat; import androidx.core.view.MenuCompat; +import androidx.core.widget.TextViewCompat; import androidx.fragment.app.FragmentActivity; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Observer; @@ -1014,7 +1015,8 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS tvDozeDone.setTextColor(isIgnoring ? textColorPrimary : colorWarning); tvDozeDone.setCompoundDrawablesWithIntrinsicBounds( (isIgnoring ? done : todo).mutate(), null, null, null); - tvDozeDone.setCompoundDrawableTintList(ColorStateList.valueOf(isIgnoring ? textColorPrimary : colorWarning)); + TextViewCompat.setCompoundDrawableTintList(tvDozeDone, + ColorStateList.valueOf(isIgnoring ? textColorPrimary : colorWarning)); btnDoze.setEnabled(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M); btnDoze.setCompoundDrawablesRelativeWithIntrinsicBounds( @@ -1203,7 +1205,8 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS tvPermissionsDone.setTextColor(all ? textColorPrimary : colorWarning); tvPermissionsDone.setCompoundDrawablesWithIntrinsicBounds( (all ? done : todo).mutate(), null, null, null); - tvPermissionsDone.setCompoundDrawableTintList(ColorStateList.valueOf(all ? textColorPrimary : colorWarning)); + TextViewCompat.setCompoundDrawableTintList(tvPermissionsDone, + ColorStateList.valueOf(all ? textColorPrimary : colorWarning)); btnPermissions.setCompoundDrawablesRelativeWithIntrinsicBounds( 0, 0, all ? R.drawable.twotone_settings_24 : R.drawable.twotone_check_24, 0);