diff --git a/OsmAnd/res/drawable-hdpi/ic_layer_bottom_dark.png b/OsmAnd/res/drawable-hdpi/ic_layer_bottom_dark.png
index 2364a6bfb5..bcd03041ac 100644
Binary files a/OsmAnd/res/drawable-hdpi/ic_layer_bottom_dark.png and b/OsmAnd/res/drawable-hdpi/ic_layer_bottom_dark.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_layer_top_dark.png b/OsmAnd/res/drawable-hdpi/ic_layer_top_dark.png
index e435a9ae3f..2df3ab2f60 100644
Binary files a/OsmAnd/res/drawable-hdpi/ic_layer_top_dark.png and b/OsmAnd/res/drawable-hdpi/ic_layer_top_dark.png differ
diff --git a/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_day.png b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_day.png
new file mode 100644
index 0000000000..978b2a32c7
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_day.png differ
diff --git a/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_night.png b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_night.png
new file mode 100644
index 0000000000..e27396aeed
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_big_night.png differ
diff --git a/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_day.png b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_day.png
new file mode 100644
index 0000000000..a5ea3b2407
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_day.png differ
diff --git a/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_night.png b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_night.png
new file mode 100644
index 0000000000..325637dd70
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/widget_live_monitoring_rec_small_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_layer_bottom_dark.png b/OsmAnd/res/drawable-mdpi/ic_layer_bottom_dark.png
index 6c294c20c6..92739cdbd5 100644
Binary files a/OsmAnd/res/drawable-mdpi/ic_layer_bottom_dark.png and b/OsmAnd/res/drawable-mdpi/ic_layer_bottom_dark.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_layer_top_dark.png b/OsmAnd/res/drawable-mdpi/ic_layer_top_dark.png
index 32152f3f8d..9c49bcd533 100644
Binary files a/OsmAnd/res/drawable-mdpi/ic_layer_top_dark.png and b/OsmAnd/res/drawable-mdpi/ic_layer_top_dark.png differ
diff --git a/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_day.png b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_day.png
new file mode 100644
index 0000000000..3477dfa3c5
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_day.png differ
diff --git a/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_night.png b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_night.png
new file mode 100644
index 0000000000..8ae9d0993d
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_big_night.png differ
diff --git a/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_day.png b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_day.png
new file mode 100644
index 0000000000..b02a8d4343
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_day.png differ
diff --git a/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_night.png b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_night.png
new file mode 100644
index 0000000000..5ecf911646
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/widget_live_monitoring_rec_small_night.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_layer_bottom_dark.png b/OsmAnd/res/drawable-xhdpi/ic_layer_bottom_dark.png
index a692b1809a..0f160f0a19 100644
Binary files a/OsmAnd/res/drawable-xhdpi/ic_layer_bottom_dark.png and b/OsmAnd/res/drawable-xhdpi/ic_layer_bottom_dark.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_layer_top_dark.png b/OsmAnd/res/drawable-xhdpi/ic_layer_top_dark.png
index e39475a1e3..4d9742a674 100644
Binary files a/OsmAnd/res/drawable-xhdpi/ic_layer_top_dark.png and b/OsmAnd/res/drawable-xhdpi/ic_layer_top_dark.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_day.png b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_day.png
new file mode 100644
index 0000000000..012338139f
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_day.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_night.png b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_night.png
new file mode 100644
index 0000000000..c1a5ce5880
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_big_night.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_day.png b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_day.png
new file mode 100644
index 0000000000..f85e569009
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_day.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_night.png b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_night.png
new file mode 100644
index 0000000000..5b909d04a7
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/widget_live_monitoring_rec_small_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_layer_bottom_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_layer_bottom_dark.png
index b33e87d1e9..1165f7b8e2 100644
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_layer_bottom_dark.png and b/OsmAnd/res/drawable-xxhdpi/ic_layer_bottom_dark.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_layer_top_dark.png b/OsmAnd/res/drawable-xxhdpi/ic_layer_top_dark.png
index 3648504ae1..20bb1149f7 100644
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_layer_top_dark.png and b/OsmAnd/res/drawable-xxhdpi/ic_layer_top_dark.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_day.png b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_day.png
new file mode 100644
index 0000000000..4669962b98
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_day.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_night.png b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_night.png
new file mode 100644
index 0000000000..bf20021550
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_big_night.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_day.png b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_day.png
new file mode 100644
index 0000000000..5abf9287c4
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_day.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_night.png b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_night.png
new file mode 100644
index 0000000000..ca380dac1e
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/widget_live_monitoring_rec_small_night.png differ
diff --git a/OsmAnd/res/layout/open_bug.xml b/OsmAnd/res/layout/open_bug.xml
index 9d6f11336e..18daf5159a 100644
--- a/OsmAnd/res/layout/open_bug.xml
+++ b/OsmAnd/res/layout/open_bug.xml
@@ -2,53 +2,46 @@
+ android:orientation="vertical"
+ android:paddingLeft="?dialogPreferredPadding"
+ android:paddingRight="?dialogPreferredPadding">
+ android:layout_height="wrap_content"
+ android:text="@string/osb_comment_dialog_message"/>
+ android:layout_height="wrap_content"
+ android:inputType="textMultiLine"
+ android:minLines="1"/>
+ android:layout_height="wrap_content"
+ android:text="@string/osb_comment_dialog_author"/>
+ android:layout_height="wrap_content"
+ android:text="NoName"/>
+ android:layout_height="wrap_content"
+ android:text="@string/osb_author_dialog_password"/>
+ android:layout_height="wrap_content"
+ android:inputType="textPassword"/>
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 8b464e7563..92479183ac 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,9 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
+ Exception occurred: note was not modified
+ Modify note
+ Modify OSM note
Add copy of start point as destination.
Make round trip
Navigate
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsDbHelper.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsDbHelper.java
index c2a84f8256..d689349af4 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsDbHelper.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsDbHelper.java
@@ -47,6 +47,19 @@ public class OsmBugsDbHelper extends SQLiteOpenHelper {
return cache;
}
+ public boolean updateOsmBug(long id, String text) {
+ SQLiteDatabase db = getWritableDatabase();
+ if (db != null) {
+ db.execSQL("UPDATE " + OSMBUGS_TABLE_NAME +
+ " SET " + OSMBUGS_COL_TEXT + " = ? " +
+ "WHERE " + OSMBUGS_COL_ID + " = ?", new Object[]{text, id});
+ checkOsmbugsPoints(db);
+ db.close();
+ return true;
+ }
+ return false;
+ }
+
public boolean addOsmbugs(OsmNotesPoint p) {
SQLiteDatabase db = getWritableDatabase();
if (db != null) {
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java
index cf1567c6ac..7452609509 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLayer.java
@@ -304,19 +304,24 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
return bugs;
}
-
- private void asyncActionTask(final OpenStreetNote bug, final String text, final Action action) {
+ private void asyncActionTask(final OpenStreetNote bug, final OsmNotesPoint point, final String text, final Action action) {
AsyncTask task = new AsyncTask() {
private OsmBugsUtil osmbugsUtil;
@Override
protected OsmBugResult doInBackground(Void... params) {
- osmbugsUtil = getOsmbugsUtil(bug);
- OsmNotesPoint pnt = new OsmNotesPoint();
- pnt.setId(bug.getId());
- pnt.setLatitude(bug.getLatitude());
- pnt.setLongitude(bug.getLongitude());
- return osmbugsUtil.commit(pnt, text, action);
+ if (bug != null) {
+ osmbugsUtil = getOsmbugsUtil(bug);
+ OsmNotesPoint pnt = new OsmNotesPoint();
+ pnt.setId(bug.getId());
+ pnt.setLatitude(bug.getLatitude());
+ pnt.setLongitude(bug.getLongitude());
+ return osmbugsUtil.commit(pnt, text, action);
+ } else if (point != null) {
+ osmbugsUtil = local;
+ return osmbugsUtil.modify(point, text);
+ }
+ return null;
}
protected void onPostExecute(OsmBugResult obj) {
@@ -351,6 +356,9 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
} else if (action == Action.CREATE) {
r = R.string.osn_add_dialog_error;
openBug(bug.getLatitude(), bug.getLongitude(), text);
+ } else if (action == null) {
+ r = R.string.osn_modify_dialog_error;
+ modifyBug(point);
} else {
commentBug(bug, text);
}
@@ -374,11 +382,10 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
bug.setLatitude(latitude);
bug.setLongitude(longitude);
- if (autofill) asyncActionTask(bug, message, Action.CREATE);
+ if (autofill) asyncActionTask(bug, null, message, Action.CREATE);
else showBugDialog(bug, Action.CREATE, message);
}
-
public void closeBug(final OpenStreetNote bug, String txt) {
showBugDialog(bug, Action.DELETE, txt);
}
@@ -391,6 +398,15 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
showBugDialog(bug, Action.MODIFY, txt);
}
+ public void modifyBug(final OsmNotesPoint point) {
+ showBugDialog(point);
+ }
+
+ private void showBugDialog(final OsmNotesPoint point) {
+ String text = point.getText();
+ createBugDialog(true, text, R.string.osn_modify_dialog_title, null, null, point);
+ }
+
private void showBugDialog(final OpenStreetNote bug, final Action action, String text) {
int title;
if (action == Action.DELETE) {
@@ -406,6 +422,10 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
OsmBugsUtil util = getOsmbugsUtil(bug);
final boolean offline = util instanceof OsmBugsLocalUtil;
+ createBugDialog(offline, text, title, action, bug, null);
+ }
+
+ private void createBugDialog(final boolean offline, String text, int posButtonTitleRes, final Action action, final OpenStreetNote bug, final OsmNotesPoint point) {
@SuppressLint("InflateParams")
final View view = LayoutInflater.from(activity).inflate(R.layout.open_bug, null);
if (offline) {
@@ -425,13 +445,15 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.shared_string_commit);
builder.setView(view);
- builder.setPositiveButton(title, new DialogInterface.OnClickListener() {
+ builder.setPositiveButton(posButtonTitleRes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
+ String text = offline ? getMessageText(view) : getTextAndUpdateUserPwd(view);
+ activity.getContextMenu().close();
if (bug != null) {
- String text = offline ? getMessageText(view) : getTextAndUpdateUserPwd(view);
- activity.getContextMenu().close();
- asyncActionTask(bug, text, action);
+ asyncActionTask(bug, null, text, action);
+ } else if (point != null) {
+ asyncActionTask(null, point, text, null);
}
}
});
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLocalUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLocalUtil.java
index 9caee4e678..074109673d 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLocalUtil.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsLocalUtil.java
@@ -32,7 +32,18 @@ public class OsmBugsLocalUtil implements OsmBugsUtil {
}
return wrap(point, db.addOsmbugs(point));
}
-
+
+ @Override
+ public OsmBugResult modify(OsmNotesPoint point, String text) {
+ OsmNotesPoint pnt = new OsmNotesPoint();
+ pnt.setId(point.getId());
+ pnt.setLatitude(point.getLatitude());
+ pnt.setLongitude(point.getLongitude());
+ pnt.setText(text);
+ point = pnt;
+ return wrap(point, db.updateOsmBug(point.getId(), text));
+ }
+
private OsmBugResult wrap(OsmNotesPoint p, boolean success) {
OsmBugResult s = new OsmBugResult();
s.local = p;
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
index 955a05ebcf..dc31f35b0b 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
@@ -61,6 +61,11 @@ public class OsmBugsRemoteUtil implements OsmBugsUtil {
return commit(point, text, action, false);
}
+ @Override
+ public OsmBugResult modify(OsmNotesPoint bug, String text) {
+ return null;
+ }
+
public OsmBugResult commit(OsmNotesPoint point, String text, Action action, boolean anonymous) {
StringBuilder b = new StringBuilder();
String msg = "";
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsUtil.java
index bcc040722c..715eec2057 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsUtil.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsUtil.java
@@ -10,5 +10,7 @@ public interface OsmBugsUtil {
}
public OsmBugResult commit(OsmNotesPoint bug, String text, Action action);
+
+ OsmBugResult modify(OsmNotesPoint bug, String text);
}
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
index b0795033b2..705182b4eb 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
@@ -40,6 +40,7 @@ import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
import java.util.List;
+import java.util.Map;
public class OsmEditingPlugin extends OsmandPlugin {
@@ -181,6 +182,8 @@ public class OsmEditingPlugin extends OsmandPlugin {
EditPoiDialogFragment.TAG);
} else if (resId == R.string.context_menu_item_open_note) {
openOsmNote(mapActivity, latitude, longitude);
+ } else if (resId == R.string.context_menu_item_modify_note) {
+ modifyOsmNote(mapActivity, (OsmNotesPoint) selectedObj);
} else if (resId == R.string.poi_context_menu_delete) {
new EditPoiDialogFragment.ShowDeleteDialogAsyncTask(mapActivity)
.execute((Amenity) selectedObj);
@@ -220,9 +223,15 @@ public class OsmEditingPlugin extends OsmandPlugin {
.setListener(listener)
.createItem());
}
- adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.context_menu_item_open_note, mapActivity)
- .setIcon(R.drawable.ic_action_bug_dark)
- .setListener(listener).createItem());
+ if (selectedObj instanceof OsmNotesPoint) {
+ adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.context_menu_item_modify_note, mapActivity)
+ .setIcon(R.drawable.ic_action_edit_dark)
+ .setListener(listener).createItem());
+ } else {
+ adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.context_menu_item_open_note, mapActivity)
+ .setIcon(R.drawable.ic_action_bug_dark)
+ .setListener(listener).createItem());
+ }
}
public void openOsmNote(MapActivity mapActivity, double latitude, double longitude) {
@@ -239,6 +248,13 @@ public class OsmEditingPlugin extends OsmandPlugin {
osmBugsLayer.openBug(latitude, longitude, message, autofill);
}
+ public void modifyOsmNote(MapActivity mapActivity, OsmNotesPoint point) {
+ if (osmBugsLayer == null) {
+ registerLayers(mapActivity);
+ }
+ osmBugsLayer.modifyBug(point);
+ }
+
@Override
public void addMyPlacesTab(FavoritesActivity favoritesActivity, List mTabs, Intent intent) {
if (getDBPOI().getOpenstreetmapPoints().size() > 0 || getDBBug().getOsmbugsPoints().size() > 0) {
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java
index 356d6765b6..cd221f2e5f 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsFragment.java
@@ -24,11 +24,13 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
+import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
+import net.osmand.AndroidUtils;
import net.osmand.data.PointDescription;
import net.osmand.osm.edit.Node;
import net.osmand.plus.OsmandApplication;
@@ -46,6 +48,7 @@ import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.plus.osmedit.OsmPoint.Action;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.PoiUploaderType;
+import net.osmand.util.Algorithms;
import org.xmlpull.v1.XmlSerializer;
@@ -351,6 +354,33 @@ public class OsmEditsFragment extends OsmAndListFragment
}
+ private void showBugDialog(final OsmNotesPoint point) {
+ final View view = LayoutInflater.from(getActivity()).inflate(R.layout.open_bug, null);
+ view.findViewById(R.id.user_name_field).setVisibility(View.GONE);
+ view.findViewById(R.id.userNameEditTextLabel).setVisibility(View.GONE);
+ view.findViewById(R.id.password_field).setVisibility(View.GONE);
+ view.findViewById(R.id.passwordEditTextLabel).setVisibility(View.GONE);
+ String text = point.getText();
+ if (!Algorithms.isEmpty(text)) {
+ ((EditText) view.findViewById(R.id.message_field)).setText(text);
+ }
+
+ final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+ builder.setTitle(R.string.shared_string_commit);
+ builder.setView(view);
+ builder.setPositiveButton(R.string.osn_modify_dialog_title, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ String text = ((EditText) view.findViewById(R.id.message_field)).getText().toString();
+ plugin.getDBBug().updateOsmBug(point.getId(), text);
+ point.setText(text);
+ notifyDataSetChanged();
+ }
+ });
+ builder.setNegativeButton(R.string.shared_string_cancel, null);
+ builder.create().show();
+ }
+
public static void getOsmEditView(View v, OsmPoint child, OsmandApplication app) {
TextView viewName = ((TextView) v.findViewById(R.id.name));
ImageView icon = (ImageView) v.findViewById(R.id.icon);
@@ -503,6 +533,18 @@ public class OsmEditsFragment extends OsmAndListFragment
}
});
}
+ if (info instanceof OsmNotesPoint) {
+ item = optionsMenu.getMenu().add(R.string.context_menu_item_modify_note)
+ .setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_edit_dark));
+ item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ showBugDialog((OsmNotesPoint) info);
+ return true;
+ }
+ });
+ }
item = optionsMenu.getMenu().add(R.string.shared_string_delete).
setIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_action_delete_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
index c2d72534fd..bc7a26b26b 100644
--- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
+++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHidePoiAction.java
@@ -277,10 +277,6 @@ public class ShowHidePoiAction extends QuickAction {
final PoiFiltersHelper poiFilters = app.getPoiFilters();
final ContextMenuAdapter adapter = new ContextMenuAdapter();
- adapter.addItem(new ContextMenuItem.ItemBuilder()
- .setTitleId(R.string.shared_string_search, app)
- .setIcon(R.drawable.ic_action_search_dark).createItem());
-
final List list = new ArrayList<>();
list.add(poiFilters.getCustomPOIFilter());