diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2019-09-03 23:31:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-03 23:31:50 +0200 |
commit | 06d81c56b501eb786ccf51dbab2a95e5f1324395 (patch) | |
tree | b62bad4e213a29e9f725c262cc4f445730dc2953 | |
parent | cbaf8818bf3e7c9af59937927d3e7e05fa7aec16 (diff) | |
parent | 4497c952a90deb3267b145b6f69451747d21f5d2 (diff) | |
download | AntennaPod-06d81c56b501eb786ccf51dbab2a95e5f1324395.zip |
Merge pull request #3375 from orionlee/bugfix_batch_edit_deselect_all_fab_overlay_3374
fix batch edit: deselect all label and FAB overlay remains when deselect all
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java index 1d4b62fc3..ed35495fa 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -3,7 +3,6 @@ package de.danoeh.antennapod.dialog; import android.app.AlertDialog; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.os.Build; import android.os.Bundle; import android.support.annotation.IdRes; import android.support.annotation.NonNull; @@ -13,7 +12,6 @@ import android.support.design.widget.Snackbar; import android.support.v4.app.ActivityCompat; import android.support.v4.app.Fragment; import android.support.v4.util.ArrayMap; -import android.support.v4.view.ViewCompat; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.util.Log; @@ -218,7 +216,13 @@ public class EpisodesApplyActionFragment extends Fragment { } private void showSpeedDialIfAnyChecked() { - mSpeedDialView.setVisibility(checkedIds.size() > 0 ? View.VISIBLE : View.GONE); + if (checkedIds.size() > 0) { + if (!mSpeedDialView.isShown()) { + mSpeedDialView.show(); + } + } else { + mSpeedDialView.hide(); // hide() also handles UI, e.g., overlay properly. + } } @Override @@ -242,10 +246,13 @@ public class EpisodesApplyActionFragment extends Fragment { // Prepare icon for select toggle button int[] icon = new int[1]; + @StringRes int titleResId; if (checkedIds.size() == episodes.size()) { icon[0] = R.attr.ic_select_none; + titleResId = R.string.deselect_all_label; } else { icon[0] = R.attr.ic_select_all; + titleResId = R.string.select_all_label; } TypedArray a = getActivity().obtainStyledAttributes(icon); @@ -253,6 +260,7 @@ public class EpisodesApplyActionFragment extends Fragment { a.recycle(); mSelectToggle.setIcon(iconDrawable); + mSelectToggle.setTitle(titleResId); } @Override |