diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 1b75c89e8c..fcf5a8548e 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -212,6 +212,7 @@ task collectHelpContentsAssets(type: Copy) { include "changes.html" include "faq.html" include "technical-articles.html" + include "map-legend.html" } from("../../help/website/feature_articles"){ include "*.html" diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index 95f3e527c0..e53b1bbb28 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -12,11 +12,11 @@ - \u2022 Reworked context-sensitive UI for tapping locations on the map and handling location items on other screens\n\n - \u2022 Chose if primary app control should be Dashboard or Menu based\n\n + \u2022 New context-sensitive UI for tapping locations on the map and on other screens\n\n + \u2022 Choice between Dashboard or Menu as primary app control\n\n \u2022 New Wikipedia data, now downloads per country, and with much more complete data\n\n \u2022 Better route recalculation (after repeated attempts engine now suggests a different route)\n\n - \u2022 POI Search now supports more specific queries (like fuel type and religion specific queries)\n\n + \u2022 POI Search now supports more specific queries\n\n \u2022 Map data download structure and interface reworked\n\n and more... diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 50d004467d..6e1e388de2 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -2011,4 +2011,5 @@ Skjul foreslåede objekter Læs mere Hvad er nyt i - + + diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 9c6bdf2bfe..ea41891d3e 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1,4 +1,5 @@ - + + Sovrapposizioni fluorescenti Usa colori fluorescenti per visualizzare tracce e percorsi Modifiche offline @@ -2018,7 +2019,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Come scaricare le mappe, imposta le impostazioni di baae Impostazioni di navigazione FAQ - Come utilizzare i componenti aggiuntivi + Domande frequenti Visualizzazione mappa Ricerca sulla mappa Pianifica un viaggio @@ -2038,4 +2039,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz - \ No newline at end of file + Nascondi gli oggetti proposti + diff --git a/OsmAnd/res/values-lt/strings.xml b/OsmAnd/res/values-lt/strings.xml index 529efc6fe4..80264922cb 100644 --- a/OsmAnd/res/values-lt/strings.xml +++ b/OsmAnd/res/values-lt/strings.xml @@ -1,4 +1,5 @@ - + + Pradžios taškas yra per toli nuo artimiausio kelio. Bendrinta vieta Dėmesio @@ -1970,7 +1971,7 @@ Prašom aktyvuoti SRTM įskiepį Pirmi žngsniai su OsmAnd Galimybės - Kaip naudotis įskiepiais + Dažnai užduodami klausimai Žemėlapio peržiūra @@ -2001,4 +2002,7 @@ Atsiliepimai Legenda Pirmasis paleidimas - \ No newline at end of file + Skaityti toliau + Kas naujo + Paslėpti siūlomus objektus + diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 52483a3ed6..4997c025d6 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -1,4 +1,5 @@ - + + Ammustra sa positzione semper a su tzentru Boghe Mistura @@ -1960,7 +1961,7 @@ Comente iscarrigare sas mapas e definire sas impostatziones de base Cunfigura su nàvigu Preguntas fitianas (FAQ) - Comente usare sas estensiones + Dimandas fitianas Visione de sa mapa Chircare in sa mapa Pranificare unu biàgiu @@ -1980,4 +1981,7 @@ Agiorna - \ No newline at end of file + Leghe àteru + Ite b\'est de nou in + Cua sos ogetos propostos + diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index d8b5907540..b2fcee9f57 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -1,4 +1,4 @@ - + Zobraziť @@ -1941,7 +1941,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda, Ako sťahovať mapy, urobiť základné nastavenia Nastavenie navigácie Otázky - Ako používať zásuvné moduly + Často kladené otázky Prezeranie mapy Hľadanie na mape Plánovanie výletu @@ -1955,4 +1955,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda, Aktualizovať Skryť plánované objekty - \ No newline at end of file +Prečítať viac + Čo je nové v + + diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index a21094ba1a..54a78229a5 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1,4 +1,5 @@ - + + För att låsa upp skärmen tryck på låsikonen Välj land Välj stad @@ -1947,7 +1948,7 @@ Hur man hämtar kartor och gör grundinställningar Ställa in navigering Frågor och svar - Hur man använder insticksmoduler + Frågor och svar Kartvisning Söka på kartan Att planera en resa @@ -1968,4 +1969,6 @@ Återkoppling - \ No newline at end of file + Läs mer + Nyheter + diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index f43b2d81bc..6ad95a06fa 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1,4 +1,5 @@ - + + 選擇道路的色彩調配: 道路的色彩調配 顯示目的地方向 @@ -1945,7 +1946,7 @@ 如何下載地圖、設置基本設定 設置導航 常見問題 - 如何使用外掛元件 + 常見的問題 地圖檢視 地圖查詢中 規劃一次旅程 @@ -1966,4 +1967,7 @@ 更新 隱藏已提出的物件 +讀取更多 + 有什麼新的在 + diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 65625aa2b7..f028489343 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -2056,4 +2056,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A Feedback Contact us Map legend + diff --git a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java index 041089a066..da59d62626 100644 --- a/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/HelpActivity.java @@ -43,7 +43,7 @@ public class HelpActivity extends OsmandActionBarActivity { public static final int DIALOG = 5; final static HelpMenuCategory[] categories = HelpMenuCategory.values(); public static final String OSMAND_POLL_HTML = "http://osmand.net/android-poll.html"; - public static final String OSMAND_MAP_LEGEND = "http://osmand.net/help/map-legend_default.png"; + //public static final String OSMAND_MAP_LEGEND = "http://osmand.net/help/map-legend_default.png"; @Override protected void onCreate(Bundle savedInstanceState) { @@ -140,15 +140,17 @@ public class HelpActivity extends OsmandActionBarActivity { "feature_articles/find-something-on-map.html", getActivity())); arrayList.add(new HelpMenuItem(R.string.planning_trip_item, -1, -1, "feature_articles/trip-planning.html", getActivity())); - final String legendName = getActivity().getString(R.string.map_legend); - View.OnClickListener onClickListener = new View.OnClickListener() { - @Override - public void onClick(View v) { - HelpArticleDialogFragment.instantiateWithUrl(OSMAND_MAP_LEGEND, legendName) - .show(getFragmentManager(), null); - } - }; - arrayList.add(new HelpMenuItem(legendName, null, onClickListener)); + //final String legendName = getActivity().getString(R.string.map_legend); + //View.OnClickListener onClickListener = new View.OnClickListener() { + // @Override + // public void onClick(View v) { + // HelpArticleDialogFragment.instantiateWithUrl(OSMAND_MAP_LEGEND, legendName) + // .show(getFragmentManager(), null); + // } + //}; + //arrayList.add(new HelpMenuItem(legendName, getActivity().getString(R.string.map_legend_item_description), onClickListener)); + arrayList.add(new HelpMenuItem(R.string.map_legend, -1, -1, + "feature_articles/map-legend.html", getActivity())); return arrayList; } @@ -176,7 +178,7 @@ public class HelpActivity extends OsmandActionBarActivity { String releasedate = ""; if (!this.getString(R.string.app_edition).equals("")) { - releasedate = ", " + this.getString(R.string.shared_string_release).toLowercase() + ": " + this.getString(R.string.app_edition); + releasedate = ", " + this.getString(R.string.shared_string_release).toLowerCase() + ": " + this.getString(R.string.app_edition); } String version = Version.getFullVersion(getOsmandApplication()) + " " + releasedate; ShowArticleOnTouchListener listener = new ShowArticleOnTouchListener( diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index c2bed57359..6a0098d7e4 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -78,6 +78,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl List mTabs = new ArrayList(); public static final String FILTER_KEY = "filter"; public static final String FILTER_CAT = "filter_cat"; + public static final String FILTER_GROUP = "filter_group"; public static final String TAB_TO_OPEN = "Tab_to_open"; public static final String LOCAL_TAB = "local"; @@ -91,6 +92,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl private ViewPager viewPager; private String filter; private String filterCat; + private String filterGroup; protected Set> fragSet = new HashSet<>(); private DownloadIndexesThread downloadThread; private DownloadValidationManager downloadValidationManager; @@ -165,6 +167,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl if (intent != null && intent.getExtras() != null) { filter = intent.getExtras().getString(FILTER_KEY); filterCat = intent.getExtras().getString(FILTER_CAT); + filterGroup = intent.getExtras().getString(FILTER_GROUP); } showFirstTimeExternalStorage(); } @@ -605,6 +608,12 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl return res; } + public String getFilterGroupAndClear() { + String res = filterGroup; + filterGroup = null; + return res; + } + @SuppressWarnings("deprecation") public static void updateDescriptionTextWithSize(DownloadActivity activity, View view) { TextView descriptionText = (TextView) view.findViewById(R.id.rightTextView); diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java index f678997253..cefec714d6 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java @@ -114,6 +114,26 @@ public class DownloadResourceGroup { } } + public DownloadResourceGroup getRegionGroup(WorldRegion region) { + DownloadResourceGroup res = null; + if (this.region == region) { + res = this; + } else if (groups != null) { + for (DownloadResourceGroup group : groups) { + if (group.region == region) { + res = group; + break; + } else { + res = group.getRegionGroup(region); + if (res != null) { + break; + } + } + } + } + return res; + } + public void trimEmptyGroups() { if(groups != null) { for(DownloadResourceGroup gr : groups) { diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java index dae31b7939..804e3cd2bb 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java @@ -112,6 +112,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow reloadData(); String filter = getDownloadActivity().getFilterAndClear(); String filterCat = getDownloadActivity().getFilterCatAndClear(); + String filterGroup = getDownloadActivity().getFilterGroupAndClear(); if (filter != null) { getDownloadActivity().showDialog(getActivity(), SearchDialogFragment.createInstance(filter)); @@ -122,6 +123,10 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow .createInstance(uniqueId); ((DownloadActivity) getActivity()).showDialog(getActivity(), regionDialogFragment); } + } else if (filterGroup != null) { + final DownloadResourceGroupFragment regionDialogFragment = DownloadResourceGroupFragment + .createInstance(filterGroup); + ((DownloadActivity) getActivity()).showDialog(getActivity(), regionDialogFragment); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java index 2f2a188c81..e8655f5620 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapDataMenuController.java @@ -2,6 +2,7 @@ package net.osmand.plus.mapcontextmenu.controllers; import android.app.AlertDialog; import android.content.DialogInterface; +import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.AsyncTask; @@ -13,8 +14,10 @@ import net.osmand.map.WorldRegion; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadActivityType; import net.osmand.plus.download.DownloadIndexesThread; +import net.osmand.plus.download.DownloadResourceGroup; import net.osmand.plus.download.DownloadValidationManager; import net.osmand.plus.download.IndexItem; import net.osmand.plus.helpers.FileNameTranslationHelper; @@ -72,7 +75,16 @@ public class MapDataMenuController extends MenuController { topRightTitleButtonController = new TitleButtonController() { @Override public void buttonPressed() { - // todo other maps + getMapActivity().getContextMenu().close(); + + DownloadResourceGroup group = downloadThread.getIndexes().getRegionGroup(region); + if (group != null) { + final Intent intent = new Intent(getMapActivity(), getMapActivity().getMyApplication() + .getAppCustomization().getDownloadIndexActivity()); + intent.putExtra(DownloadActivity.FILTER_GROUP, group.getUniqueId()); + intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.DOWNLOAD_TAB); + getMapActivity().startActivity(intent); + } } }; topRightTitleButtonController.caption = getMapActivity().getString(R.string.download_select_map_types); @@ -138,7 +150,14 @@ public class MapDataMenuController extends MenuController { addPlainMenuItem(R.drawable.ic_action_info_dark, indexItem.getSizeDescription(getMapActivity()), false); } if (region != null && !Algorithms.isEmpty(region.getParams().getWikiLink())) { - addPlainMenuItem(R.drawable.ic_action_wikipedia, region.getParams().getWikiLink(), true); + String[] items = region.getParams().getWikiLink().split(":"); + String url; + if (items.length > 1) { + url = "https://" + items[0] + ".wikipedia.org/wiki/" + items[1]; + } else { + url = "https://wikipedia.org/wiki/" + items[0]; + } + addPlainMenuItem(R.drawable.ic_world_globe_dark, url, true); } if (indexItem != null) { DateFormat dateFormat = android.text.format.DateFormat.getMediumDateFormat(getMapActivity());