Fix FAB overlay sometimes not showing
We use the same ID for each overlay layout. The speed dial searches everywhere, even in invisible fragments, so it sometimes shows/hides the wrong overlay layout.
This commit is contained in:
parent
160401ad13
commit
11a7d67f97
|
@ -84,6 +84,7 @@ public class CompletedDownloadsFragment extends Fragment implements
|
|||
progressBar = root.findViewById(R.id.progLoading);
|
||||
|
||||
speedDialView = root.findViewById(R.id.fabSD);
|
||||
speedDialView.setOverlayLayout(root.findViewById(R.id.fabSDOverlay));
|
||||
speedDialView.inflate(R.menu.episodes_apply_action_speeddial);
|
||||
speedDialView.removeActionItemById(R.id.download_batch);
|
||||
speedDialView.removeActionItemById(R.id.mark_read_batch);
|
||||
|
|
|
@ -238,6 +238,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
|||
|
||||
// Init action UI (via a FAB Speed Dial)
|
||||
speedDialView = root.findViewById(R.id.fabSD);
|
||||
speedDialView.setOverlayLayout(root.findViewById(R.id.fabSDOverlay));
|
||||
speedDialView.inflate(R.menu.episodes_apply_action_speeddial);
|
||||
speedDialView.setOnChangeListener(new SpeedDialView.OnChangeListener() {
|
||||
@Override
|
||||
|
|
|
@ -465,6 +465,7 @@ public class QueueFragment extends Fragment implements Toolbar.OnMenuItemClickLi
|
|||
progLoading.setVisibility(View.VISIBLE);
|
||||
|
||||
speedDialView = root.findViewById(R.id.fabSD);
|
||||
speedDialView.setOverlayLayout(root.findViewById(R.id.fabSDOverlay));
|
||||
speedDialView.inflate(R.menu.episodes_apply_action_speeddial);
|
||||
speedDialView.removeActionItemById(R.id.mark_read_batch);
|
||||
speedDialView.removeActionItemById(R.id.mark_unread_batch);
|
||||
|
|
|
@ -167,6 +167,7 @@ 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
|
||||
|
|
Loading…
Reference in New Issue