From 3f21b5e4af10ce2f84272b25d678d35ae41ef6db Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 21 Aug 2015 18:16:37 +0300 Subject: [PATCH 1/2] Merge fix --- .../osmand/plus/osmedit/OsmEditingPlugin.java | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index dbbdd5820f..7c9aabcb43 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -69,7 +69,7 @@ public class OsmEditingPlugin extends OsmandPlugin { private OsmBugsLayer osmBugsLayer; private OsmEditsLayer osmEditsLayer; - private EditingPOIDialogProvider poiActions; +// private EditingPOIDialogProvider poiActions; @Override public void updateLayers(OsmandMapTileView mapView, MapActivity activity) { @@ -120,8 +120,8 @@ public class OsmEditingPlugin extends OsmandPlugin { @Override public void mapActivityCreate(MapActivity activity) { // Always create new actions ! - poiActions = new EditingPOIDialogProvider(activity, this); - activity.addDialogProvider(getPoiActions(activity)); +// poiActions = new EditingPOIDialogProvider(activity, this); +// activity.addDialogProvider(getPoiActions(activity)); activity.addDialogProvider(getBugsLayer(activity)); } @@ -131,12 +131,12 @@ public class OsmEditingPlugin extends OsmandPlugin { return SettingsOsmEditingActivity.class; } - public EditingPOIDialogProvider getPoiActions(MapActivity activity) { - if (poiActions == null) { - poiActions = new EditingPOIDialogProvider(activity, this); - } - return poiActions; - } +// public EditingPOIDialogProvider getPoiActions(MapActivity activity) { +// if (poiActions == null) { +// poiActions = new EditingPOIDialogProvider(activity, this); +// } +// return poiActions; +// } @Override public void registerMapContextMenuActions(final MapActivity mapActivity, @@ -149,8 +149,11 @@ public class OsmEditingPlugin extends OsmandPlugin { public boolean onContextMenuClick(ArrayAdapter adapter, int resId, int pos, boolean isChecked) { if (resId == R.string.context_menu_item_create_poi) { //getPoiActions(mapActivity).showCreateDialog(latitude, longitude); + EditPoiFragment editPoiFragment = + EditPoiFragment.createAddPoiInstance(latitude, longitude, + mapActivity.getMyApplication()); mapActivity.getSupportFragmentManager().beginTransaction() - .add(R.id.fragmentContainer, new EditPoiFragment(), EditPoiFragment.TAG) + .add(R.id.fragmentContainer, editPoiFragment, EditPoiFragment.TAG) .addToBackStack(null) .commit(); } else if (resId == R.string.context_menu_item_open_bug) { @@ -158,11 +161,13 @@ public class OsmEditingPlugin extends OsmandPlugin { registerLayers(mapActivity); } osmBugsLayer.openBug(latitude, longitude); - } else if (resId == R.string.poi_context_menu_delete) { - getPoiActions(mapActivity).showDeleteDialog((Amenity) selectedObj); - } else if (resId == R.string.poi_context_menu_modify) { - getPoiActions(mapActivity).showEditDialog((Amenity) selectedObj); - } + } //else if (resId == R.string.poi_context_menu_delete) { + // TODO implement delete +// getPoiActions(mapActivity).showDeleteDialog((Amenity) selectedObj); +// } else if (resId == R.string.poi_context_menu_modify) { + // TODO implement edit +// getPoiActions(mapActivity).showEditDialog((Amenity) selectedObj); +// } return true; } }; From 6405bc0ba1f41cd5c11516923df917041e44e360 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Sat, 22 Aug 2015 17:13:01 +0300 Subject: [PATCH 2/2] change icon color --- OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index daa46490b2..ce3403b715 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -189,7 +189,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { final boolean isRecording = app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get(); ImageButton stop = ((ImageButton) v.findViewById(R.id.stop)); if (isRecording) { - stop.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_rec_stop, R.color.recording_color)); + stop.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_rec_stop)); } else { stop.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_rec_start)); }