commit
ecf98c3983
11 changed files with 25 additions and 28 deletions
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.49,5 12,5C11.51,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8ZM14,16H10V14H14V16ZM14,12H10V10H14V12Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</vector>
|
|
@ -11,7 +11,6 @@ import net.osmand.data.LatLon;
|
|||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.osmedit.OsmEditingPlugin;
|
||||
import net.osmand.plus.quickaction.QuickAction;
|
||||
import net.osmand.plus.quickaction.QuickActionType;
|
||||
|
||||
|
@ -23,7 +22,7 @@ public class AddOSMBugAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(12,
|
||||
"osmbug.add", AddOSMBugAction.class).
|
||||
nameRes(R.string.quick_action_add_osm_bug).iconRes(R.drawable.ic_action_bug_dark).
|
||||
nameRes(R.string.quick_action_add_osm_bug).iconRes(R.drawable.ic_action_osm_note_add).
|
||||
category(QuickActionType.CREATE_CATEGORY);
|
||||
|
||||
public AddOSMBugAction() {
|
||||
|
|
|
@ -182,7 +182,7 @@ public class EditPOIMenuController extends MenuController {
|
|||
}
|
||||
return iconResId;
|
||||
} else if (osmPoint.getGroup() == OsmPoint.Group.BUG) {
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
return R.drawable.ic_action_osm_note_add;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ExportOptionsBottomSheetDialogFragment extends MenuBottomSheetDialo
|
|||
|
||||
BaseBottomSheetItem osmNotesItem = new BottomSheetItemWithDescription.Builder()
|
||||
.setDescription(String.valueOf(osmNotesCount))
|
||||
.setIcon(getContentIcon(R.drawable.ic_action_bug_dark))
|
||||
.setIcon(getContentIcon(R.drawable.ic_action_osm_note))
|
||||
.setTitle(getString(R.string.osm_notes))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_right_descr)
|
||||
.setDisabled(!(osmNotesCount > 0))
|
||||
|
|
|
@ -79,9 +79,9 @@ public class OsmBugMenuController extends MenuController {
|
|||
@Override
|
||||
public Drawable getRightIcon() {
|
||||
if (bug.isOpened()) {
|
||||
return getIcon(R.drawable.ic_action_info_dark, R.color.osm_bug_unresolved_icon_color);
|
||||
return getIcon(R.drawable.ic_action_osm_note_unresolved, R.color.osm_bug_unresolved_icon_color);
|
||||
} else {
|
||||
return getIcon(R.drawable.ic_action_info_dark, R.color.osm_bug_resolved_icon_color);
|
||||
return getIcon(R.drawable.ic_action_osm_note_resolved, R.color.osm_bug_resolved_icon_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
} else {
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.context_menu_item_open_note, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_OPEN_OSM_NOTE)
|
||||
.setIcon(R.drawable.ic_action_bug_dark)
|
||||
.setIcon(R.drawable.ic_action_osm_note_add)
|
||||
.setOrder(OPEN_OSM_NOTE_ITEM_ORDER)
|
||||
.setListener(listener)
|
||||
.createItem());
|
||||
|
@ -337,7 +337,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
.setId(OSM_NOTES)
|
||||
.setTitleId(R.string.layer_osm_bugs, mapActivity)
|
||||
.setSelected(settings.SHOW_OSM_BUGS.get())
|
||||
.setIcon(R.drawable.ic_action_bug_dark)
|
||||
.setIcon(R.drawable.ic_action_osm_note)
|
||||
.setColor(settings.SHOW_OSM_BUGS.get() ? R.color.osmand_orange : ContextMenuItem.INVALID_ID)
|
||||
.setSecondaryIcon(R.drawable.ic_action_additional_option)
|
||||
.setListener(new ContextMenuAdapter.OnRowItemClick() {
|
||||
|
|
|
@ -287,7 +287,7 @@ public class OsmEditsAdapter extends ArrayAdapter<Object> {
|
|||
}
|
||||
return app.getUIUtilities().getIcon(iconResId, colorResId);
|
||||
} else if (point.getGroup() == OsmPoint.Group.BUG) {
|
||||
return app.getUIUtilities().getIcon(R.drawable.ic_action_bug_dark, R.color.color_distance);
|
||||
return app.getUIUtilities().getIcon(R.drawable.ic_action_osm_note, R.color.color_distance);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class OsmEditsFragment extends OsmAndListFragment implements SendPoiDialo
|
|||
if (child.getGroup() == Group.POI) {
|
||||
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_info_dark, R.color.color_distance));
|
||||
} else if (child.getGroup() == Group.BUG) {
|
||||
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_bug_dark, R.color.color_distance));
|
||||
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_osm_note, R.color.color_distance));
|
||||
}
|
||||
|
||||
TextView descr = (TextView) v.findViewById(R.id.description);
|
||||
|
|
|
@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import net.osmand.data.FavouritePoint.BackgroundType;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
|
@ -26,6 +27,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static net.osmand.data.FavouritePoint.DEFAULT_BACKGROUND_TYPE;
|
||||
|
||||
public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider,
|
||||
ContextMenuLayer.IMoveObjectProvider {
|
||||
private static final int startZoom = 10;
|
||||
|
@ -79,17 +82,21 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
|||
}
|
||||
}
|
||||
|
||||
private void drawPoint(Canvas canvas, OsmPoint o, float x, float y) {
|
||||
private void drawPoint(Canvas canvas, OsmPoint osmPoint, float x, float y) {
|
||||
float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
|
||||
int iconId = getIconId(o);
|
||||
int iconId = getIconId(osmPoint);
|
||||
BackgroundType backgroundType = DEFAULT_BACKGROUND_TYPE;
|
||||
if (osmPoint.getGroup() == OsmPoint.Group.BUG) {
|
||||
backgroundType = BackgroundType.COMMENT;
|
||||
}
|
||||
PointImageDrawable pointImageDrawable = PointImageDrawable.getOrCreate(activity,
|
||||
ContextCompat.getColor(activity, R.color.created_poi_icon_color), true,
|
||||
iconId);
|
||||
ContextCompat.getColor(activity, R.color.created_poi_icon_color), true, false,
|
||||
iconId, backgroundType);
|
||||
pointImageDrawable.setAlpha(0.8f);
|
||||
pointImageDrawable.drawPoint(canvas, x, y, textScale, false);
|
||||
int offsetY = backgroundType.getOffsetY(activity, textScale);
|
||||
pointImageDrawable.drawPoint(canvas, x, y - offsetY, textScale, false);
|
||||
}
|
||||
|
||||
|
||||
public int getIconId(OsmPoint osmPoint) {
|
||||
if (osmPoint.getGroup() == OsmPoint.Group.POI) {
|
||||
OpenstreetmapPoint osmP = (OpenstreetmapPoint) osmPoint;
|
||||
|
@ -115,7 +122,7 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
|
|||
}
|
||||
return iconResId;
|
||||
} else if (osmPoint.getGroup() == OsmPoint.Group.BUG) {
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
return R.drawable.mm_special_symbol_plus;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ public class OsmNotesMenu {
|
|||
adapter.addItem(new ContextMenuItem.ItemBuilder()
|
||||
.setTitleId(osmNotesStringId, mapActivity)
|
||||
.setDescription(mapActivity.getString(R.string.switch_osm_notes_visibility_desc))
|
||||
.setIcon(R.drawable.ic_action_bug_dark)
|
||||
.setIcon(R.drawable.ic_action_osm_note)
|
||||
.setColor(toggleIconColorId)
|
||||
.setListener(l)
|
||||
.setSelected(showOsmBugs)
|
||||
|
|
|
@ -16,7 +16,7 @@ public class ShowHideOSMBugAction extends QuickAction {
|
|||
|
||||
public static final QuickActionType TYPE = new QuickActionType(24,
|
||||
"osmbug.showhide", ShowHideOSMBugAction.class).
|
||||
nameRes(R.string.quick_action_showhide_osmbugs_title).iconRes(R.drawable.ic_action_bug_dark).nonEditable().
|
||||
nameRes(R.string.quick_action_showhide_osmbugs_title).iconRes(R.drawable.ic_action_osm_note).nonEditable().
|
||||
category(QuickActionType.CONFIGURE_MAP);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue