Open navigation in pedestrian mode in parking
This commit is contained in:
parent
bd2f898a40
commit
df49c6b61a
2 changed files with 13 additions and 1 deletions
|
@ -47,6 +47,7 @@ import net.osmand.plus.mapcontextmenu.other.ShareMenu;
|
|||
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
|
||||
import net.osmand.plus.mapmarkers.RenameMarkerBottomSheetDialogFragment;
|
||||
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
|
||||
import net.osmand.plus.parkingpoint.ParkingPositionMenuController;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
import net.osmand.plus.views.ContextMenuLayer;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
|
@ -416,6 +417,10 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
init(latLon, pointDescription, object);
|
||||
}
|
||||
|
||||
public boolean navigateInPedestrianMode() {
|
||||
return menuController instanceof ParkingPositionMenuController;
|
||||
}
|
||||
|
||||
public boolean close() {
|
||||
boolean result = false;
|
||||
if (active) {
|
||||
|
@ -762,6 +767,9 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
}
|
||||
|
||||
public void navigateButtonPressed() {
|
||||
if (navigateInPedestrianMode()) {
|
||||
settings.APPLICATION_MODE.set(ApplicationMode.PEDESTRIAN);
|
||||
}
|
||||
mapActivity.getMapLayers().getMapControlsLayer().navigateButton();
|
||||
}
|
||||
|
||||
|
|
|
@ -476,7 +476,11 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
}
|
||||
});
|
||||
TextView directionsButton = (TextView) view.findViewById(R.id.context_menu_directions_button);
|
||||
Drawable drawable = getIcon(R.drawable.map_directions, bottomButtonsColor);
|
||||
int iconResId = R.drawable.map_directions;
|
||||
if (menu.navigateInPedestrianMode()) {
|
||||
iconResId = R.drawable.map_action_pedestrian_dark;
|
||||
}
|
||||
Drawable drawable = getIcon(iconResId, bottomButtonsColor);
|
||||
directionsButton.setTextColor(ContextCompat.getColor(getContext(), bottomButtonsColor));
|
||||
directionsButton.setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null);
|
||||
directionsButton.setCompoundDrawablePadding(dpToPx(8));
|
||||
|
|
Loading…
Reference in a new issue