Revert "Set item group text color to workaround an Android bug"

This reverts commit 4eff805ef4.
This commit is contained in:
M66B 2022-01-02 17:50:36 +01:00
parent 4eff805ef4
commit 6bb2f9d179
4 changed files with 0 additions and 28 deletions

View File

@ -145,9 +145,6 @@ public class FragmentAccounts extends FragmentBase {
rvAccount.addItemDecoration(itemDecorator); 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()) { DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) {
@Override @Override
public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { 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 tvCategory = header.findViewById(R.id.tvCategory);
TextView tvDate = header.findViewById(R.id.tvDate); TextView tvDate = header.findViewById(R.id.tvDate);
tvCategory.setTextColor(textColorSecondary);
tvDate.setTextColor(textColorTertiary);
if (cards) { if (cards) {
View vSeparator = header.findViewById(R.id.vSeparator); View vSeparator = header.findViewById(R.id.vSeparator);
vSeparator.setVisibility(View.GONE); vSeparator.setVisibility(View.GONE);

View File

@ -217,9 +217,6 @@ public class FragmentFolders extends FragmentBase {
} }
if (unified) { 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()) { DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) {
@Override @Override
public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { 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 tvCategory = header.findViewById(R.id.tvCategory);
TextView tvDate = header.findViewById(R.id.tvDate); TextView tvDate = header.findViewById(R.id.tvDate);
tvCategory.setTextColor(textColorSecondary);
tvDate.setTextColor(textColorTertiary);
if (cards) { if (cards) {
View vSeparator = header.findViewById(R.id.vSeparator); View vSeparator = header.findViewById(R.id.vSeparator);
vSeparator.setVisibility(View.GONE); vSeparator.setVisibility(View.GONE);

View File

@ -92,9 +92,6 @@ public class FragmentIdentities extends FragmentBase {
rvIdentity.addItemDecoration(itemDecorator); 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()) { DividerItemDecoration categoryDecorator = new DividerItemDecoration(getContext(), llm.getOrientation()) {
@Override @Override
public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) { 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 tvCategory = header.findViewById(R.id.tvCategory);
TextView tvDate = header.findViewById(R.id.tvDate); TextView tvDate = header.findViewById(R.id.tvDate);
tvCategory.setTextColor(textColorSecondary);
tvDate.setTextColor(textColorTertiary);
if (cards) { if (cards) {
View vSeparator = header.findViewById(R.id.vSeparator); View vSeparator = header.findViewById(R.id.vSeparator);
vSeparator.setVisibility(View.GONE); vSeparator.setVisibility(View.GONE);

View File

@ -677,17 +677,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
rvMessage.addItemDecoration(itemDecorator); 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); View inGroup = view.findViewById(R.id.inGroup);
TextView tvFixedCategory = inGroup.findViewById(R.id.tvCategory); TextView tvFixedCategory = inGroup.findViewById(R.id.tvCategory);
TextView tvFixedDate = inGroup.findViewById(R.id.tvDate); TextView tvFixedDate = inGroup.findViewById(R.id.tvDate);
View vFixedSeparator = inGroup.findViewById(R.id.vSeparator); View vFixedSeparator = inGroup.findViewById(R.id.vSeparator);
tvFixedCategory.setTextColor(textColorSecondary);
tvFixedDate.setTextColor(textColorTertiary);
String sort = prefs.getString(getSort(getContext(), viewType, type), "time"); String sort = prefs.getString(getSort(getContext(), viewType, type), "time");
inGroup.setVisibility(date_fixed && "time".equals(sort) ? View.INVISIBLE : View.GONE); inGroup.setVisibility(date_fixed && "time".equals(sort) ? View.INVISIBLE : View.GONE);
tvFixedCategory.setVisibility(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); View header = inflater.inflate(R.layout.item_group, null, false);
TextView tvCategory = header.findViewById(R.id.tvCategory); TextView tvCategory = header.findViewById(R.id.tvCategory);
TextView tvDate = header.findViewById(R.id.tvDate); TextView tvDate = header.findViewById(R.id.tvDate);
tvCategory.setTextColor(textColorSecondary);
tvDate.setTextColor(textColorTertiary);
tvCategory.setVisibility(ch ? View.VISIBLE : View.GONE); tvCategory.setVisibility(ch ? View.VISIBLE : View.GONE);
tvDate.setVisibility(dh ? View.VISIBLE : View.GONE); tvDate.setVisibility(dh ? View.VISIBLE : View.GONE);