summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod
diff options
context:
space:
mode:
authorTaco <SkytkRSfan3895@gmail.com>2024-03-17 06:49:56 -0400
committerGitHub <noreply@github.com>2024-03-17 11:49:56 +0100
commit48c0ccb4a261eed51959973e86e673ec27462bfa (patch)
tree19b343edb6157e9123eb5c3e7d8289011dc77b9f /app/src/main/java/de/danoeh/antennapod
parentda21d92f969d84e0c2a9f37c3d9b5d56c117c92a (diff)
downloadAntennaPod-48c0ccb4a261eed51959973e86e673ec27462bfa.zip
Fix "add podcast" FAB still visible under SpeedDial main FAB (#6950)
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
index 811d46f2c..fb2115218 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java
@@ -87,6 +87,8 @@ public class SubscriptionFragment extends Fragment
private Disposable disposable;
private SharedPreferences prefs;
+ private FloatingActionButton subscriptionAddButton;
+
private SpeedDialView speedDialView;
private List<NavDrawerData.DrawerItem> listItems;
@@ -155,7 +157,7 @@ public class SubscriptionFragment extends Fragment
progressBar = root.findViewById(R.id.progressBar);
progressBar.setVisibility(View.VISIBLE);
- FloatingActionButton subscriptionAddButton = root.findViewById(R.id.subscriptions_add);
+ subscriptionAddButton = root.findViewById(R.id.subscriptions_add);
subscriptionAddButton.setOnClickListener(view -> {
if (getActivity() instanceof MainActivity) {
((MainActivity) getActivity()).loadChildFragment(new AddFeedFragment());
@@ -173,16 +175,6 @@ public class SubscriptionFragment extends Fragment
speedDialView = root.findViewById(R.id.fabSD);
speedDialView.setOverlayLayout(root.findViewById(R.id.fabSDOverlay));
speedDialView.inflate(R.menu.nav_feed_action_speeddial);
- speedDialView.setOnChangeListener(new SpeedDialView.OnChangeListener() {
- @Override
- public boolean onMainActionSelected() {
- return false;
- }
-
- @Override
- public void onToggleChanged(boolean isOpen) {
- }
- });
speedDialView.setOnActionSelectedListener(actionItem -> {
new FeedMultiSelectActionHandler((MainActivity) getActivity(), subscriptionAdapter.getSelectedItems())
.handleAction(actionItem.getId());
@@ -336,7 +328,6 @@ public class SubscriptionFragment extends Fragment
Feed feed = ((NavDrawerData.FeedDrawerItem) drawerItem).feed;
if (itemId == R.id.multi_select) {
- speedDialView.setVisibility(View.VISIBLE);
return subscriptionAdapter.onContextItemSelected(item);
}
return FeedMenuHandler.onMenuItemClicked(this, item.getItemId(), feed, this::loadSubscriptions);
@@ -356,6 +347,7 @@ public class SubscriptionFragment extends Fragment
public void onEndSelectMode() {
speedDialView.close();
speedDialView.setVisibility(View.GONE);
+ subscriptionAddButton.setVisibility(View.VISIBLE);
subscriptionAdapter.setItems(listItems);
}
@@ -368,5 +360,7 @@ public class SubscriptionFragment extends Fragment
}
}
subscriptionAdapter.setItems(feedsOnly);
+ speedDialView.setVisibility(View.VISIBLE);
+ subscriptionAddButton.setVisibility(View.GONE);
}
}