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() {
|
leftTitleButtonController = new TitleButtonController() {
|
||||||
@Override
|
@Override
|
||||||
public void buttonPressed() {
|
public void buttonPressed() {
|
||||||
|
mapContextMenu.hide(false);
|
||||||
TrackMenuFragment.showInstance(mapActivity, selectedGpxPoint.getSelectedGpxFile());
|
TrackMenuFragment.showInstance(mapActivity, selectedGpxPoint.getSelectedGpxFile());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -230,11 +230,18 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
if (getCurrentMenuState() != MenuState.HEADER_ONLY && isPortrait()) {
|
if (getCurrentMenuState() != MenuState.HEADER_ONLY && isPortrait()) {
|
||||||
openMenuHeaderOnly();
|
openMenuHeaderOnly();
|
||||||
} else {
|
} else {
|
||||||
|
dismiss();
|
||||||
|
|
||||||
MapActivity mapActivity = getMapActivity();
|
MapActivity mapActivity = getMapActivity();
|
||||||
if (mapActivity != null && mapActivity.getSupportFragmentManager().getBackStackEntryCount() == 1) {
|
if (mapActivity != null) {
|
||||||
|
MapContextMenu contextMenu = mapActivity.getContextMenu();
|
||||||
|
if (contextMenu.isActive() && contextMenu.getPointDescription() != null
|
||||||
|
&& contextMenu.getPointDescription().isGpxPoint()) {
|
||||||
|
contextMenu.show();
|
||||||
|
} else {
|
||||||
mapActivity.launchPrevActivityIntent();
|
mapActivity.launchPrevActivityIntent();
|
||||||
}
|
}
|
||||||
dismiss();
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue