diff --git a/OsmAnd/res/layout/point_editor_fragment.xml b/OsmAnd/res/layout/point_editor_fragment.xml
index 213e1a2d3b..129003f099 100644
--- a/OsmAnd/res/layout/point_editor_fragment.xml
+++ b/OsmAnd/res/layout/point_editor_fragment.xml
@@ -55,14 +55,24 @@
+
+
0) {
+ textView.setTextColor(view.getResources().getColor(textColor));
+ }
+
+ LinearLayout.LayoutParams llTextViewParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ llTextViewParams.setMargins(0, 0, dpToPx(10f), 0);
+ llTextViewParams.gravity = Gravity.CENTER_VERTICAL;
+ llText.setLayoutParams(llTextViewParams);
+ llText.addView(textView);
+
+ ((LinearLayout) view).addView(ll);
+
+ View horizontalLine = new View(view.getContext());
+ LinearLayout.LayoutParams llHorLineParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dpToPx(1f));
+ llHorLineParams.gravity = Gravity.BOTTOM;
+ horizontalLine.setLayoutParams(llHorLineParams);
+
+ horizontalLine.setBackgroundColor(app.getResources().getColor(light ? R.color.ctx_menu_info_divider_light : R.color.ctx_menu_info_divider_dark));
+
+ ((LinearLayout) view).addView(horizontalLine);
+
+ rowBuilt();
+ }
+
+ @Override
+ public void build(View view) {
+ super.build(view);
+
+ for (MenuBuilder.PlainMenuItem item : plainMenuItems) {
+ buildRow(view, item.getIconId(), item.getText(), 0);
+ }
+ }
+}
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/details/PointDescriptionMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/details/PointDescriptionMenuController.java
new file mode 100644
index 0000000000..1450da1d56
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/details/PointDescriptionMenuController.java
@@ -0,0 +1,84 @@
+package net.osmand.plus.mapcontextmenu.details;
+
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+
+import net.osmand.data.LatLon;
+import net.osmand.data.PointDescription;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.R;
+import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.activities.search.SearchHistoryFragment;
+
+public class PointDescriptionMenuController extends MenuController {
+
+ private PointDescription pointDescription;
+ private LatLon latLon;
+
+ public PointDescriptionMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription, LatLon latLon) {
+ super(new PointDescriptionMenuBuilder(app, pointDescription), mapActivity);
+ this.pointDescription = pointDescription;
+ this.latLon = latLon;
+ }
+
+ @Override
+ protected int getInitialMenuStatePortrait() {
+ return MenuState.HEADER_ONLY;
+ }
+
+ @Override
+ protected int getSupportedMenuStatesPortrait() {
+ return MenuState.HEADER_ONLY | MenuState.HALF_SCREEN | MenuState.FULL_SCREEN;
+ }
+
+ @Override
+ public boolean needTypeStr() {
+ String typeName = pointDescription.getTypeName();
+ return (typeName != null && !typeName.isEmpty());
+ }
+
+ @Override
+ public Drawable getLeftIcon() {
+ return getIcon(SearchHistoryFragment.getItemIcon(pointDescription));
+ }
+
+ @Override
+ public Drawable getSecondLineIcon() {
+ if (needTypeStr()) {
+ return getIcon(R.drawable.ic_small_group);
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getNameStr() {
+ return pointDescription.getSimpleName(getMapActivity(), false);
+ }
+
+ @Override
+ public String getTypeStr() {
+ if (needTypeStr()) {
+ return pointDescription.getTypeName();
+ } else {
+ return "";
+ }
+ }
+
+ @Override
+ public boolean needStreetName() {
+ return !pointDescription.isAddress();
+ }
+
+ @Override
+ public void addPlainMenuItems(String typeStr, PointDescription pointDescription) {
+ if (pointDescription != null) {
+ addPlainMenuItem(R.drawable.map_my_location, PointDescription.getLocationName(getMapActivity(),
+ latLon.getLatitude(), latLon.getLongitude(), true).replaceAll("\n", ""));
+ }
+ }
+
+ @Override
+ public void saveEntityState(Bundle bundle, String key) {
+ }
+}