summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/menuhandler
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-10-25 17:31:47 +0100
committerByteHamster <info@bytehamster.com>2020-10-25 17:31:47 +0100
commitc8a2f20000032228226149500767ba903752e0a5 (patch)
tree0c56db9a3d01f6ce916d26d84a7ae9ca0ec5b60d /app/src/main/java/de/danoeh/antennapod/menuhandler
parent28ebbedbdf34b72b31c536a118bcf5108b3ea7e5 (diff)
parent3e4e6381bd39a40b210e5b6ab054e3adee371330 (diff)
downloadAntennaPod-c8a2f20000032228226149500767ba903752e0a5.zip
Merge branch 'develop' into add-local-feeds
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/menuhandler')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/menuhandler/MenuItemUtils.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/MenuItemUtils.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/MenuItemUtils.java
index 76091327d..6b3c99975 100644
--- a/app/src/main/java/de/danoeh/antennapod/menuhandler/MenuItemUtils.java
+++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/MenuItemUtils.java
@@ -8,6 +8,7 @@ import androidx.appcompat.widget.SearchView;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.core.preferences.UserPreferences;
+import de.danoeh.antennapod.core.util.ThemeUtils;
import de.danoeh.antennapod.fragment.SearchFragment;
/**
@@ -30,15 +31,16 @@ public class MenuItemUtils extends de.danoeh.antennapod.core.menuhandler.MenuIte
ta.recycle();
}
- public static void setupSearchItem(Menu menu, MainActivity activity, long feedId) {
+ public static void setupSearchItem(Menu menu, MainActivity activity, long feedId, String feedTitle) {
MenuItem searchItem = menu.findItem(R.id.action_search);
final SearchView sv = (SearchView) searchItem.getActionView();
+ sv.setBackgroundColor(ThemeUtils.getColorFromAttr(activity, android.R.attr.windowBackground));
sv.setQueryHint(activity.getString(R.string.search_label));
sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
sv.clearFocus();
- activity.loadChildFragment(SearchFragment.newInstance(s, feedId));
+ activity.loadChildFragment(SearchFragment.newInstance(s, feedId, feedTitle));
searchItem.collapseActionView();
return true;
}