From 46f7805a963f0d89cb1443105529d6cc804f2513 Mon Sep 17 00:00:00 2001 From: orionlee Date: Thu, 4 Apr 2019 15:30:00 -0700 Subject: [PATCH] refactor - bulk edit UI - make fab clickable on Pre-Lollipop devices without custom codes. --- .../dialog/EpisodesApplyActionFragment.java | 18 ----------------- .../layout/episodes_apply_action_fragment.xml | 20 ++++++++++++------- 2 files changed, 13 insertions(+), 25 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 355b97e75..612d6d608 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; @@ -220,29 +219,12 @@ public class EpisodesApplyActionFragment extends Fragment { return view; } - @Override - public void onStart() { - super.onStart(); - compatEnsureSpeedDialClickable(); - } - @Override public void onStop() { restoreActionBarTitle(); // it might have been changed to "N selected". Restore original. super.onStop(); } - private void compatEnsureSpeedDialClickable() { - // On pre-Lollipop devices (that does not support elevation), - // need to explicitly bring the fab to the front, otherwise it won't be clickable. - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - ViewGroup root = (ViewGroup)getView(); - root.bringChildToFront(root.findViewById(R.id.fabSDScrollCtr)); - root.requestLayout(); - root.invalidate(); - } - } - private void showSpeedDialIfAnyChecked() { mSpeedDialView.setVisibility(checkedIds.size() > 0 ? View.VISIBLE : View.GONE); } diff --git a/app/src/main/res/layout/episodes_apply_action_fragment.xml b/app/src/main/res/layout/episodes_apply_action_fragment.xml index 4ac9e25cf..9693d44d4 100644 --- a/app/src/main/res/layout/episodes_apply_action_fragment.xml +++ b/app/src/main/res/layout/episodes_apply_action_fragment.xml @@ -4,11 +4,24 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + - -