Fix context menu visibility
This commit is contained in:
parent
c0727f658f
commit
2bd2839f49
2 changed files with 12 additions and 4 deletions
|
@ -42,6 +42,7 @@ public class SelectedGpxMenuController extends MenuController {
|
|||
leftTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
mapContextMenu.hide(false);
|
||||
TrackMenuFragment.showInstance(mapActivity, selectedGpxPoint.getSelectedGpxFile());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -230,11 +230,18 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
|||
if (getCurrentMenuState() != MenuState.HEADER_ONLY && isPortrait()) {
|
||||
openMenuHeaderOnly();
|
||||
} else {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null && mapActivity.getSupportFragmentManager().getBackStackEntryCount() == 1) {
|
||||
mapActivity.launchPrevActivityIntent();
|
||||
}
|
||||
dismiss();
|
||||
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
MapContextMenu contextMenu = mapActivity.getContextMenu();
|
||||
if (contextMenu.isActive() && contextMenu.getPointDescription() != null
|
||||
&& contextMenu.getPointDescription().isGpxPoint()) {
|
||||
contextMenu.show();
|
||||
} else {
|
||||
mapActivity.launchPrevActivityIntent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue