Changed share text

This commit is contained in:
Daniele Verducci (Slimpenguin) 2024-02-23 08:57:49 +01:00
parent 5949099d91
commit 49e291881a
3 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@ public class IntentGenerator {
i.setAction(Intent.ACTION_SEND); i.setAction(Intent.ACTION_SEND);
i.setType("text/plain"); i.setType("text/plain");
String shareMessage = context.getString(R.string.share_message) String shareMessage = context.getString(R.string.share_message)
.replace("{title}", item.getName() == null ? context.getString(R.string.share_message_default_title) : item.getName())
.replace("{lat}", ""+item.getLat()) .replace("{lat}", ""+item.getLat())
.replace("{lng}", ""+item.getLng()); .replace("{lng}", ""+item.getLng());
i.putExtra(Intent.EXTRA_TEXT, shareMessage ); i.putExtra(Intent.EXTRA_TEXT, shareMessage );

View File

@ -31,7 +31,8 @@
<string name="list_mode">Lista</string> <string name="list_mode">Lista</string>
<string name="search_in_all">Cerca per nome</string> <string name="search_in_all">Cerca per nome</string>
<string name="share_via">Condividi via</string> <string name="share_via">Condividi via</string>
<string name="share_message">Posizione condivisa: {lat}°N, {lng}°E https://www.openstreetmap.org/#map=17/{lat}/{lng}</string> <string name="share_message">{title}: {lat}°N, {lng}°E https://www.openstreetmap.org/#map=17/{lat}/{lng}</string>
<string name="share_message_default_title">Posizione condivisa:</string>
<string name="list_context_menu_share">Condividi</string> <string name="list_context_menu_share">Condividi</string>
<string name="list_context_menu_delete">Elimina</string> <string name="list_context_menu_delete">Elimina</string>
<string name="dialog_delete_title">Elimina geosegnalibro</string> <string name="dialog_delete_title">Elimina geosegnalibro</string>

View File

@ -30,7 +30,8 @@
<string name="list_mode">List</string> <string name="list_mode">List</string>
<string name="search_in_all">Search by name</string> <string name="search_in_all">Search by name</string>
<string name="share_via">Share via</string> <string name="share_via">Share via</string>
<string name="share_message">Check out this place: {lat}°N, {lng}°E https://www.openstreetmap.org/#map=17/{lat}/{lng}</string> <string name="share_message">{title}: {lat}°N, {lng}°E https://www.openstreetmap.org/#map=17/{lat}/{lng}</string>
<string name="share_message_default_title">Check out this place:</string>
<string name="list_context_menu_share">Share</string> <string name="list_context_menu_share">Share</string>
<string name="list_context_menu_delete">Delete</string> <string name="list_context_menu_delete">Delete</string>
<string name="dialog_delete_title">Delete geofavorite</string> <string name="dialog_delete_title">Delete geofavorite</string>