summaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-03-12 13:28:30 +0100
committerByteHamster <info@bytehamster.com>2020-03-15 20:09:11 +0100
commit7f4d43deb16ee0ce6a49f78805e5600d3e01161f (patch)
tree504079a84ba03df68a10fac7048d7240faa94cd3 /core/src/main
parent03d1f41e9bd88e1920be306ef8bcd10642ce5527 (diff)
downloadAntennaPod-7f4d43deb16ee0ce6a49f78805e5600d3e01161f.zip
Moved Toolbar to individual Fragments
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/menuhandler/MenuItemUtils.java5
-rw-r--r--core/src/main/res/layout/refresh_action_view.xml14
2 files changed, 10 insertions, 9 deletions
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"/>