mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Fixed Android 5 compatibility
This commit is contained in:
parent
289e95a818
commit
1b249be20e
3 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue