diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2020-03-16 18:50:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 18:50:00 +0100 |
commit | 15b1afa38b3ca1614296acc55ecc0535ac39df28 (patch) | |
tree | d8416d2830b980358d73afc97db73c2a3093d8ac /core/src | |
parent | 2c72c3855b117713d0a23d63cbe95c41922fada6 (diff) | |
parent | be22ad1682ae4369a27fa3a1557cfe8e716df5d2 (diff) | |
download | AntennaPod-15b1afa38b3ca1614296acc55ecc0535ac39df28.zip |
Merge pull request #3923 from ByteHamster/toolbar
Moved Toolbar to individual Fragments
Diffstat (limited to 'core/src')
3 files changed, 21 insertions, 15 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java index d2d9e5947..bca4b1be8 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/FastBlurTransformation.java @@ -31,6 +31,16 @@ public class FastBlurTransformation extends BitmapTransformation { return result; } + @Override + public boolean equals(Object o) { + return o instanceof FastBlurTransformation; + } + + @Override + public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { + messageDigest.update(TAG.getBytes()); + } + private static Bitmap fastBlur(Bitmap bitmap, int radius) { // Stack Blur v1.0 from @@ -269,9 +279,4 @@ public class FastBlurTransformation extends BitmapTransformation { bitmap.setPixels(pix, 0, w, 0, 0, w, h); return bitmap; } - - @Override - public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { - messageDigest.update(TAG.getBytes()); - } -}
\ No newline at end of file +} diff --git a/core/src/main/java/de/danoeh/antennapod/core/menuhandler/MenuItemUtils.java b/core/src/main/java/de/danoeh/antennapod/core/menuhandler/MenuItemUtils.java index 8b2d4eb98..d5181b2b7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/menuhandler/MenuItemUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/menuhandler/MenuItemUtils.java @@ -13,7 +13,7 @@ public class MenuItemUtils { /** * Changes the appearance of a MenuItem depending on whether the given UpdateRefreshMenuItemChecker * is refreshing or not. If it returns true, the menu item will be replaced by an indeterminate progress - * bar, otherwise nothing will happen. + * bar, otherwise the progress bar will be hidden. * * @param menu The menu that the MenuItem belongs to * @param resId The id of the MenuItem @@ -22,11 +22,12 @@ public class MenuItemUtils { */ public static boolean updateRefreshMenuItem(Menu menu, int resId, UpdateRefreshMenuItemChecker checker) { // expand actionview if feeds are being downloaded, collapse otherwise + MenuItem refreshItem = menu.findItem(resId); if (checker.isRefreshing()) { - MenuItem refreshItem = menu.findItem(resId); refreshItem.setActionView(R.layout.refresh_action_view); return true; } else { + refreshItem.setActionView(null); return false; } } diff --git a/core/src/main/res/layout/refresh_action_view.xml b/core/src/main/res/layout/refresh_action_view.xml index 66148a553..d5b88922e 100644 --- a/core/src/main/res/layout/refresh_action_view.xml +++ b/core/src/main/res/layout/refresh_action_view.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:indeterminateOnly="true"> - -</ProgressBar>
\ No newline at end of file +<ProgressBar + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="48dp" + android:layout_height="48dp" + android:layout_gravity="end" + android:padding="8dp" + android:indeterminateOnly="true"/> |