summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
index 2d11e9f71..2aa97977e 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java
@@ -432,6 +432,16 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
butAction1Text = R.string.download_label;
}
}
+
+ FeedItem.State state = item.getState();
+ if (butAction2Text == R.string.delete_label && state == FeedItem.State.PLAYING) {
+ butAction2.setEnabled(false);
+ butAction2.setAlpha(0.5f);
+ } else {
+ butAction2.setEnabled(true);
+ butAction2.setAlpha(1.0f);
+ }
+
if(butAction1Icon != null && butAction1Text != 0) {
butAction1.setText(butAction1Icon +"\u0020\u0020" + getActivity().getString(butAction1Text));
Iconify.addIcons(butAction1);