From 6bb2f9d179bb4c0de04760534d57e252c650158a Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 2 Jan 2022 17:50:36 +0100 Subject: [PATCH] Revert "Set item group text color to workaround an Android bug" This reverts commit 4eff805ef478dbafed53ab98e75a1c80afcd7398. --- .../main/java/eu/faircode/email/FragmentAccounts.java | 6 ------ .../main/java/eu/faircode/email/FragmentFolders.java | 6 ------ .../java/eu/faircode/email/FragmentIdentities.java | 6 ------ .../main/java/eu/faircode/email/FragmentMessages.java | 10 ---------- 4 files changed, 28 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentAccounts.java b/app/src/main/java/eu/faircode/email/FragmentAccounts.java index 400777a2d2..cf322ce0aa 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccounts.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccounts.java @@ -145,9 +145,6 @@ public class FragmentAccounts extends FragmentBase { rvAccount.addItemDecoration(itemDecorator); } - int textColorSecondary = Helper.resolveColor(getContext(), android.R.attr.textColorSecondary); - int textColorTertiary = Helper.resolveColor(getContext(), android.R.attr.textColorTertiary); - DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) { @Override public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { @@ -199,9 +196,6 @@ public class FragmentAccounts extends FragmentBase { TextView tvCategory = header.findViewById(R.id.tvCategory); TextView tvDate = header.findViewById(R.id.tvDate); - tvCategory.setTextColor(textColorSecondary); - tvDate.setTextColor(textColorTertiary); - if (cards) { View vSeparator = header.findViewById(R.id.vSeparator); vSeparator.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentFolders.java b/app/src/main/java/eu/faircode/email/FragmentFolders.java index d27b98d019..d5d82fedcb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentFolders.java +++ b/app/src/main/java/eu/faircode/email/FragmentFolders.java @@ -217,9 +217,6 @@ public class FragmentFolders extends FragmentBase { } if (unified) { - int textColorSecondary = Helper.resolveColor(getContext(), android.R.attr.textColorSecondary); - int textColorTertiary = Helper.resolveColor(getContext(), android.R.attr.textColorTertiary); - DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) { @Override public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { @@ -271,9 +268,6 @@ public class FragmentFolders extends FragmentBase { TextView tvCategory = header.findViewById(R.id.tvCategory); TextView tvDate = header.findViewById(R.id.tvDate); - tvCategory.setTextColor(textColorSecondary); - tvDate.setTextColor(textColorTertiary); - if (cards) { View vSeparator = header.findViewById(R.id.vSeparator); vSeparator.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentities.java b/app/src/main/java/eu/faircode/email/FragmentIdentities.java index 5b2ed7b1c9..006a4cd321 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentities.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentities.java @@ -92,9 +92,6 @@ public class FragmentIdentities extends FragmentBase { rvIdentity.addItemDecoration(itemDecorator); } - int textColorSecondary = Helper.resolveColor(getContext(), android.R.attr.textColorSecondary); - int textColorTertiary = Helper.resolveColor(getContext(), android.R.attr.textColorTertiary); - DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) { @Override public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { @@ -146,9 +143,6 @@ public class FragmentIdentities extends FragmentBase { TextView tvCategory = header.findViewById(R.id.tvCategory); TextView tvDate = header.findViewById(R.id.tvDate); - tvCategory.setTextColor(textColorSecondary); - tvDate.setTextColor(textColorTertiary); - if (cards) { View vSeparator = header.findViewById(R.id.vSeparator); vSeparator.setVisibility(View.GONE); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 4598d53acd..e7d28fc404 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -677,17 +677,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. rvMessage.addItemDecoration(itemDecorator); } - int textColorSecondary = Helper.resolveColor(getContext(), android.R.attr.textColorSecondary); - int textColorTertiary = Helper.resolveColor(getContext(), android.R.attr.textColorTertiary); - View inGroup = view.findViewById(R.id.inGroup); TextView tvFixedCategory = inGroup.findViewById(R.id.tvCategory); TextView tvFixedDate = inGroup.findViewById(R.id.tvDate); View vFixedSeparator = inGroup.findViewById(R.id.vSeparator); - tvFixedCategory.setTextColor(textColorSecondary); - tvFixedDate.setTextColor(textColorTertiary); - String sort = prefs.getString(getSort(getContext(), viewType, type), "time"); inGroup.setVisibility(date_fixed && "time".equals(sort) ? View.INVISIBLE : View.GONE); tvFixedCategory.setVisibility(View.GONE); @@ -780,10 +774,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. View header = inflater.inflate(R.layout.item_group, null, false); TextView tvCategory = header.findViewById(R.id.tvCategory); TextView tvDate = header.findViewById(R.id.tvDate); - - tvCategory.setTextColor(textColorSecondary); - tvDate.setTextColor(textColorTertiary); - tvCategory.setVisibility(ch ? View.VISIBLE : View.GONE); tvDate.setVisibility(dh ? View.VISIBLE : View.GONE);