Merge pull request #9610 from androiddevkotlin/master

Update map_context_menu_fragment.xml
This commit is contained in:
androiddevkotlin 2020-08-14 15:52:54 +03:00 committed by GitHub
commit 14720f951e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -455,9 +455,8 @@
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/context_menu_directions_button" android:id="@+id/context_menu_directions_button"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical" android:gravity="end|center_vertical"
android:paddingLeft="@dimen/context_menu_padding_margin_default" android:paddingLeft="@dimen/context_menu_padding_margin_default"

View file

@ -150,7 +150,7 @@ public class MapillaryPlugin extends OsmandPlugin {
@Override @Override
public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> adapter, View view, int itemId, int position) { public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> adapter, View view, int itemId, int position) {
if (itemId == R.string.mapillary) { if (itemId == R.string.street_level_imagery) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAPILLARY, AndroidUtils.getCenterViewCoordinates(view)); mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAPILLARY, AndroidUtils.getCenterViewCoordinates(view));
return false; return false;
} }
@ -160,7 +160,7 @@ public class MapillaryPlugin extends OsmandPlugin {
@Override @Override
public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) { public boolean onContextMenuClick(final ArrayAdapter<ContextMenuItem> adapter, int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandSettings settings = mapActivity.getMyApplication().getSettings(); final OsmandSettings settings = mapActivity.getMyApplication().getSettings();
if (itemId == R.string.mapillary) { if (itemId == R.string.street_level_imagery) {
OsmandMapTileView mapView = mapActivity.getMapView(); OsmandMapTileView mapView = mapActivity.getMapView();
MapActivityLayers mapLayers = mapActivity.getMapLayers(); MapActivityLayers mapLayers = mapActivity.getMapLayers();
settings.SHOW_MAPILLARY.set(!settings.SHOW_MAPILLARY.get()); settings.SHOW_MAPILLARY.set(!settings.SHOW_MAPILLARY.get());

View file

@ -268,10 +268,11 @@ public class ParkingPositionPlugin extends OsmandPlugin {
void showContextMenuIfNeeded(final MapActivity mapActivity, boolean animated) { void showContextMenuIfNeeded(final MapActivity mapActivity, boolean animated) {
MapContextMenu menu = mapActivity.getContextMenu(); MapContextMenu menu = mapActivity.getContextMenu();
FavouritePoint pnt = app.getFavorites().getSpecialPoint(SpecialPointType.PARKING);
if (menu.isVisible()) { if (menu.isVisible()) {
menu.hide(animated); menu.hide(animated);
menu.show(new LatLon(parkingPosition.getLatitude(), parkingPosition.getLongitude()), menu.show(new LatLon(parkingPosition.getLatitude(), parkingPosition.getLongitude()),
getObjectName(parkingPosition), parkingPosition); getObjectName(parkingPosition), pnt);
} }
} }