diff options
author | ByteHamster <info@bytehamster.com> | 2022-12-05 22:44:22 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-12-16 20:32:02 +0100 |
commit | 95eae1519a54b443f80715c19eb3ca6e0dd253f9 (patch) | |
tree | 2436ba8a798be30f056697d6d5e0d7693e1d272d /app | |
parent | ef97411fbba3c229d63718966430469cb0f334b9 (diff) | |
download | AntennaPod-95eae1519a54b443f80715c19eb3ca6e0dd253f9.zip |
Disable duration text box when checkbox is off
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodeFilterDialog.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodeFilterDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodeFilterDialog.java index 2aa3ab31c..220650f0f 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodeFilterDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodeFilterDialog.java @@ -28,11 +28,15 @@ public abstract class EpisodeFilterDialog extends MaterialAlertDialogBuilder { setTitle(R.string.episode_filters_label); setView(viewBinding.getRoot()); + viewBinding.durationCheckBox.setOnCheckedChangeListener( + (buttonView, isChecked) -> viewBinding.episodeFilterDurationText.setEnabled(isChecked)); if (filter.hasMinimalDurationFilter()) { viewBinding.durationCheckBox.setChecked(true); // Store minimal duration in seconds, show in minutes viewBinding.episodeFilterDurationText .setText(String.valueOf(filter.getMinimalDurationFilter() / 60)); + } else { + viewBinding.episodeFilterDurationText.setEnabled(false); } if (filter.excludeOnly()) { |