Merge branch 'master' of github.com:osmandapp/Osmand

This commit is contained in:
Victor Shcherb 2015-11-08 12:23:22 +01:00
commit a09b852f21
15 changed files with 112 additions and 34 deletions

View file

@ -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"

View file

@ -12,11 +12,11 @@
<!-- Not translatable -->
<string name="release_2_3">
\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...
</string>

View file

@ -2011,4 +2011,5 @@
<string name="rendering_attr_hideProposed_name">Skjul foreslåede objekter</string>
<string name="read_more">Læs mere</string>
<string name="whats_new">Hvad er nyt i</string>
</resources>
<!-- string name="map_legend_item_description">Signaturforklaring til OsmAnd standard kortformat, internetforbindelse er nødvendig</string -->
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="use_fluorescent_overlays">Sovrapposizioni fluorescenti</string>
<string name="use_fluorescent_overlays_descr">Usa colori fluorescenti per visualizzare tracce e percorsi</string>
<string name="offline_edition">Modifiche offline</string>
@ -2018,7 +2019,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="first_usage_item_description">Come scaricare le mappe, imposta le impostazioni di baae</string>
<string name="navigation_item_description">Impostazioni di navigazione</string>
<string name="faq_item">FAQ</string>
<string name="faq_item_description">Come utilizzare i componenti aggiuntivi</string>
<string name="faq_item_description">Domande frequenti</string>
<string name="map_viewing_item">Visualizzazione mappa</string>
<string name="search_on_the_map_item">Ricerca sulla mappa</string>
<string name="planning_trip_item">Pianifica un viaggio</string>
@ -2038,4 +2039,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
</resources>
<string name="rendering_attr_hideProposed_name">Nascondi gli oggetti proposti</string>
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="starting_point_too_far">Pradžios taškas yra per toli nuo artimiausio kelio.</string>
<string name="shared_location">Bendrinta vieta</string>
<string name="osmand_parking_warning">Dėmesio</string>
@ -1970,7 +1971,7 @@
<string name="activate_srtm_plugin">Prašom aktyvuoti SRTM įskiepį</string>
<string name="begin_with_osmand_menu_group">Pirmi žngsniai su OsmAnd</string>
<string name="features_menu_group">Galimybės</string>
<string name="faq_item_description">Kaip naudotis įskiepiais</string>
<string name="faq_item_description">Dažnai užduodami klausimai</string>
<string name="map_viewing_item">Žemėlapio peržiūra</string>
@ -2001,4 +2002,7 @@
<string name="feedback">Atsiliepimai</string>
<string name="map_legend">Legenda</string>
<string name="first_usage_item">Pirmasis paleidimas</string>
</resources>
<string name="read_more">Skaityti toliau</string>
<string name="whats_new">Kas naujo</string>
<string name="rendering_attr_hideProposed_name">Paslėpti siūlomus objektus</string>
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="always_center_position_on_map">Ammustra sa positzione semper a su tzentru</string>
<string name="voice_pref_title">Boghe</string>
<string name="misc_pref_title">Mistura</string>
@ -1960,7 +1961,7 @@
<string name="first_usage_item_description">Comente iscarrigare sas mapas e definire sas impostatziones de base</string>
<string name="navigation_item_description">Cunfigura su nàvigu</string>
<string name="faq_item">Preguntas fitianas (FAQ)</string>
<string name="faq_item_description">Comente usare sas estensiones</string>
<string name="faq_item_description">Dimandas fitianas</string>
<string name="map_viewing_item">Visione de sa mapa</string>
<string name="search_on_the_map_item">Chircare in sa mapa</string>
<string name="planning_trip_item">Pranificare unu biàgiu</string>
@ -1980,4 +1981,7 @@
<string name="shared_string_update">Agiorna</string>
</resources>
<string name="read_more">Leghe àteru</string>
<string name="whats_new">Ite b\'est de nou in</string>
<string name="rendering_attr_hideProposed_name">Cua sos ogetos propostos</string>
</resources>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="recording_context_menu_show">Zobraziť</string>
@ -1941,7 +1941,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
<string name="first_usage_item_description">Ako sťahovať mapy, urobiť základné nastavenia</string>
<string name="navigation_item_description">Nastavenie navigácie</string>
<string name="faq_item">Otázky</string>
<string name="faq_item_description">Ako používať zásuvné moduly</string>
<string name="faq_item_description">Často kladené otázky</string>
<string name="map_viewing_item">Prezeranie mapy</string>
<string name="search_on_the_map_item">Hľadanie na mape</string>
<string name="planning_trip_item">Plánovanie výletu</string>
@ -1955,4 +1955,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
<string name="shared_string_update">Aktualizovať</string>
<string name="rendering_attr_hideProposed_name">Skryť plánované objekty</string>
</resources>
<string name="read_more">Prečítať viac</string>
<string name="whats_new">Čo je nové v</string>
<!-- string name="map_legend_item_description">Vysvetlivky k základnému mapovému štýlu v OsmAnd. Pre ich zobrazenie je potrebné pripojenie na Internet</string -->
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="screen_is_locked">För att låsa upp skärmen tryck på låsikonen</string>
<string name="ChooseCountry">Välj land</string>
<string name="choose_city">Välj stad</string>
@ -1947,7 +1948,7 @@
<string name="first_usage_item_description">Hur man hämtar kartor och gör grundinställningar</string>
<string name="navigation_item_description">Ställa in navigering</string>
<string name="faq_item">Frågor och svar</string>
<string name="faq_item_description">Hur man använder insticksmoduler</string>
<string name="faq_item_description">Frågor och svar</string>
<string name="map_viewing_item">Kartvisning</string>
<string name="search_on_the_map_item">Söka på kartan</string>
<string name="planning_trip_item">Att planera en resa</string>
@ -1968,4 +1969,6 @@
<string name="feedback">Återkoppling</string>
</resources>
<string name="read_more">Läs mer</string>
<string name="whats_new">Nyheter</string>
</resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="rendering_attr_roadColors_description">選擇道路的色彩調配:</string>
<string name="rendering_attr_roadColors_name">道路的色彩調配</string>
<string name="map_widget_show_destination_arrow">顯示目的地方向</string>
@ -1945,7 +1946,7 @@
<string name="first_usage_item_description">如何下載地圖、設置基本設定</string>
<string name="navigation_item_description">設置導航</string>
<string name="faq_item">常見問題</string>
<string name="faq_item_description">如何使用外掛元件</string>
<string name="faq_item_description">常見的問題</string>
<string name="map_viewing_item">地圖檢視</string>
<string name="search_on_the_map_item">地圖查詢中</string>
<string name="planning_trip_item">規劃一次旅程</string>
@ -1966,4 +1967,7 @@
<string name="shared_string_update">更新</string>
<string name="rendering_attr_hideProposed_name">隱藏已提出的物件</string>
<string name="read_more">讀取更多</string>
<string name="whats_new">有什麼新的在</string>
<!-- string name="map_legend_item_description">圖例為 OsmAnd 預設的地圖樣式,網路需連接以去顯示</string -->
</resources>

View file

@ -2056,4 +2056,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="feedback">Feedback</string>
<string name="contact_us">Contact us</string>
<string name="map_legend">Map legend</string>
<!-- string name="map_legend_item_description">Legend for OsmAnd default map style, Internet connectivity needed to display</string -->
</resources>

View file

@ -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(

View file

@ -78,6 +78,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
List<TabActivity.TabItem> mTabs = new ArrayList<TabActivity.TabItem>();
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<WeakReference<Fragment>> 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);

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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());