diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-02-25 17:00:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 17:00:49 +0100 |
commit | ebcb5e2a7c83c16560b0b9851dda01b2d7717d16 (patch) | |
tree | 383b0ff83dc6e5fd0ea4f3b609e75628352faa00 | |
parent | 9cd59a67207411d428963de501347444f08989f0 (diff) | |
download | AntennaPod-ebcb5e2a7c83c16560b0b9851dda01b2d7717d16.zip |
Hack around black theme select background color having low contrast (#6352)
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java index cc32261da..0ec7018a7 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/EpisodeItemListAdapter.java @@ -1,7 +1,6 @@ package de.danoeh.antennapod.adapter; import android.app.Activity; -import android.content.Context; import android.os.Build; import android.view.ContextMenu; import android.view.InputDevice; @@ -15,7 +14,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.recyclerview.widget.RecyclerView; -import com.google.android.material.elevation.SurfaceColors; +import de.danoeh.antennapod.ui.common.ThemeUtils; import org.apache.commons.lang3.ArrayUtils; import java.lang.ref.WeakReference; @@ -120,9 +119,8 @@ public class EpisodeItemListAdapter extends SelectableAdapter<EpisodeItemViewHol if (inActionMode()) { holder.secondaryActionButton.setOnClickListener(null); if (isSelected(pos)) { - Context context = mainActivityRef.get(); - float density = context.getResources().getDisplayMetrics().density; - holder.itemView.setBackgroundColor(SurfaceColors.getColorForElevation(context, 8 * density)); + holder.itemView.setBackgroundColor(0x88000000 + + (0xffffff & ThemeUtils.getColorFromAttr(mainActivityRef.get(), R.attr.colorAccent))); } else { holder.itemView.setBackgroundResource(android.R.color.transparent); } |