diff options
author | orionlee <orionlee@yahoo.com> | 2019-03-20 13:12:39 -0700 |
---|---|---|
committer | orionlee <orionlee@yahoo.com> | 2019-04-02 11:47:57 -0700 |
commit | 53e25116423896e86fe219da7c90158c7c17bd8b (patch) | |
tree | c02d3d98e787b454af695e391a20fb9f720be9ee /app/src/main/java/de/danoeh/antennapod/dialog | |
parent | 4918a743a79e68d6fb348003e184a5c88e88af30 (diff) | |
download | AntennaPod-53e25116423896e86fe219da7c90158c7c17bd8b.zip |
ensure speed dials clickable (for pre-Android 5 devices)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java | 20 |
1 files changed, 19 insertions, 1 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 7b461873e..9e6c338b7 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/EpisodesApplyActionFragment.java @@ -3,6 +3,7 @@ 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.v4.app.ActivityCompat; import android.support.v4.app.Fragment; @@ -201,7 +202,24 @@ public class EpisodesApplyActionFragment extends Fragment { return view; } - + + @Override + public void onStart() { + super.onStart(); + compatEnsureSpeedDialClickable(); + } + + private void compatEnsureSpeedDialClickable() { + // On pre-Lolliop 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); } |