diff --git a/OsmAnd/res/layout-land/share_menu_fragment.xml b/OsmAnd/res/layout-land/share_menu_fragment.xml
index a8422a2d31..a9189eae1f 100644
--- a/OsmAnd/res/layout-land/share_menu_fragment.xml
+++ b/OsmAnd/res/layout-land/share_menu_fragment.xml
@@ -24,7 +24,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_weight="1"
- android:text="@string/send_location_way_choose_title"
+ android:text="@string/share_menu_title"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"/>
diff --git a/OsmAnd/res/layout/share_menu_fragment.xml b/OsmAnd/res/layout/share_menu_fragment.xml
index 6a04aceef2..d066d7413a 100644
--- a/OsmAnd/res/layout/share_menu_fragment.xml
+++ b/OsmAnd/res/layout/share_menu_fragment.xml
@@ -25,7 +25,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_weight="1"
- android:text="@string/send_location_way_choose_title"
+ android:text="@string/share_menu_title"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"/>
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 5fc234016e..1bbb2e89fd 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -2209,4 +2209,9 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
Tout mettre à jour (%1$s MB)
Téléchargements gratuits effectués
Visualiser le nombre de téléchargements gratuits déjà effectués
-
+Envoyer
+ Copier
+ geo :
+ QR-Code
+ Partager ce lieu
+
diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml
index 4b6ea9d330..6ef07d90e3 100644
--- a/OsmAnd/res/values-sv/strings.xml
+++ b/OsmAnd/res/values-sv/strings.xml
@@ -2051,4 +2051,5 @@
Hämtar - %1$d fil(er)
Urklipp
geo:
+ QR-kod
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 6a47902c78..3a807f5c36 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,9 +11,9 @@
-->
"Resets flag indicating first startup, keep other settings in the original state"
Simulate initial startup
- Clipboard
geo:
- QR-Code
+ Share location
+ Send
Specified category name already exists. Please define other name.
Category name
Add new category
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
index f0e77d9a25..5e5b4a7a24 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
@@ -398,7 +398,7 @@ public class MapContextMenu {
}
public void buttonSharePressed() {
- ShareMenu.show(latLon, pointDescription, mapActivity);
+ ShareMenu.show(latLon, nameStr, mapActivity);
}
public void buttonMorePressed() {
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java
index 14bce8c8da..e1f6046788 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/ShareMenu.java
@@ -5,13 +5,11 @@ import android.net.Uri;
import android.os.Bundle;
import net.osmand.data.LatLon;
-import net.osmand.data.PointDescription;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.activities.MapActivityActions;
import net.osmand.plus.activities.actions.ShareDialog;
import net.osmand.plus.helpers.AndroidUiHelper;
-import net.osmand.plus.mapcontextmenu.details.MenuController;
+import net.osmand.util.Algorithms;
import net.osmand.util.MapUtils;
import java.util.LinkedList;
@@ -22,18 +20,18 @@ public class ShareMenu {
private final MapActivity mapActivity;
private LatLon latLon;
- private PointDescription pointDescription;
+ private String title;
private boolean portraitMode;
private boolean largeDevice;
private static final String KEY_SHARE_MENU_LATLON = "key_share_menu_latlon";
- private static final String KEY_SHARE_MENU_POINT_DESC = "key_share_menu_point_desc";
+ private static final String KEY_SHARE_MENU_POINT_TITLE = "key_share_menu_point_title";
public enum ShareItem {
- MESSAGE(R.drawable.ic_action_aircraft, R.string.shared_string_message),
- CLIPBOARD(R.drawable.ic_action_aircraft, R.string.share_clipboard),
- GEO(R.drawable.ic_action_aircraft, R.string.share_geo),
- QR_CODE(R.drawable.ic_action_aircraft, R.string.share_qr_code);
+ MESSAGE(R.drawable.ic_action_export, R.string.shared_string_send),
+ CLIPBOARD(R.drawable.ic_action_export, R.string.shared_string_copy),
+ GEO(R.drawable.ic_action_export, R.string.share_geo),
+ QR_CODE(R.drawable.ic_action_export, R.string.share_qr_code);
final int iconResourceId;
final int titleResourceId;
@@ -95,21 +93,16 @@ public class ShareMenu {
return latLon;
}
- public PointDescription getPointDescription() {
- return pointDescription;
+ public String getTitle() {
+ return title;
}
- public static void show(LatLon latLon, PointDescription pointDescription, MapActivity mapActivity) {
+ public static void show(LatLon latLon, String title, MapActivity mapActivity) {
ShareMenu menu = new ShareMenu(mapActivity);
- if (pointDescription == null) {
- menu.pointDescription = new PointDescription(latLon.getLatitude(), latLon.getLongitude());
- } else {
- menu.pointDescription = pointDescription;
- }
-
menu.latLon = latLon;
+ menu.title = title;
ShareMenuFragment.showInstance(menu);
}
@@ -119,7 +112,13 @@ public class ShareMenu {
final String geoUrl = MapUtils.buildGeoUrl(latLon.getLatitude(), latLon.getLongitude(), zoom);
final String httpUrl = "http://osmand.net/go?lat=" + ((float) latLon.getLatitude())
+ "&lon=" + ((float) latLon.getLongitude()) + "&z=" + zoom;
- String sms = mapActivity.getString(R.string.send_location_sms_pattern, geoUrl, httpUrl);
+ StringBuilder sb = new StringBuilder();
+ if (!Algorithms.isEmpty(title)) {
+ sb.append(title).append("\n");
+ }
+ sb.append(mapActivity.getString(R.string.search_tabs_location)).append(": ");
+ sb.append(geoUrl).append("\n").append(httpUrl);
+ String sms = sb.toString();
switch (item) {
case MESSAGE:
ShareDialog.sendMessage(mapActivity, sms);
@@ -140,23 +139,16 @@ public class ShareMenu {
}
}
- public float getLandscapeWidthDp() {
- return MenuController.LANDSCAPE_WIDTH_DP;
- }
-
public void saveMenu(Bundle bundle) {
bundle.putSerializable(KEY_SHARE_MENU_LATLON, latLon);
- bundle.putSerializable(KEY_SHARE_MENU_POINT_DESC, pointDescription);
+ bundle.putString(KEY_SHARE_MENU_POINT_TITLE, title);
}
public static ShareMenu restoreMenu(Bundle bundle, MapActivity mapActivity) {
ShareMenu menu = new ShareMenu(mapActivity);
- Object pDescObj = bundle.getSerializable(KEY_SHARE_MENU_POINT_DESC);
- if (pDescObj != null) {
- menu.pointDescription = (PointDescription) pDescObj;
- }
+ menu.title = bundle.getString(KEY_SHARE_MENU_POINT_TITLE);
Object latLonObj = bundle.getSerializable(KEY_SHARE_MENU_LATLON);
if (latLonObj != null) {
menu.latLon = (LatLon) latLonObj;