This commit is contained in:
parent
c5b197beaf
commit
e8df27ef0b
2 changed files with 18 additions and 0 deletions
|
@ -1520,6 +1520,9 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
if (mapActivity != null && rec != null) {
|
||||
MapContextMenu menu = mapActivity.getContextMenu();
|
||||
menu.show(new LatLon(rec.lat, rec.lon), audioNotesLayer.getObjectName(rec), rec);
|
||||
if (app.getRoutingHelper().isFollowingMode()) {
|
||||
menu.hideWithTimeout(3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
private boolean inLocationUpdate = false;
|
||||
private boolean appModeChanged;
|
||||
private boolean appModeListenerAdded;
|
||||
private boolean autoHide;
|
||||
|
||||
private int favActionIconId;
|
||||
|
||||
|
@ -300,6 +301,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
active = false;
|
||||
}
|
||||
centerMarker = false;
|
||||
autoHide = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,6 +350,19 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
}
|
||||
}
|
||||
|
||||
// timeout in msec
|
||||
public void hideWithTimeout(long timeout) {
|
||||
autoHide = true;
|
||||
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (autoHide) {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
public void updateMenuUI() {
|
||||
WeakReference<MapContextMenuFragment> fragmentRef = findMenuFragment();
|
||||
if (fragmentRef != null) {
|
||||
|
|
Loading…
Reference in a new issue