diff --git a/OsmAnd/res/values-cs/strings.xml b/OsmAnd/res/values-cs/strings.xml
index 6de4bdc6b2..a798125e52 100644
--- a/OsmAnd/res/values-cs/strings.xml
+++ b/OsmAnd/res/values-cs/strings.xml
@@ -2072,4 +2072,28 @@ s často kladenými otázkami.
Adresa ještě není známa
Jste si jisti?
Neuložené změny budou ztraceny. Pokračovat?
-
+Vrstevnice vypnuté
+ Přidat nový
+ Zvolte kategorii
+ Zvolte způsob měření rychlosti
+ Měření rychlosti
+ nm
+ Námořní míle
+ Kilometry za hodinu
+ Míle za hodinu
+ Metrů za sekundu
+ Minut za kilometr
+ Minut za míli
+ Námořní míle za hodinu (uzly)
+ nm/h
+ min/m
+ min/km
+ m/s
+
+ Záznam cesty
+ Navigace
+ Běh na pozadí
+ Informace o oblíbeném bodu
+ Ukončit simulaci vaší polohy
+ Simulovat pomocí zaznamenané GPX nebo vypočítané trasy
+
diff --git a/OsmAnd/res/values-da/phrases.xml b/OsmAnd/res/values-da/phrases.xml
index febde38679..8a38d4bc04 100644
--- a/OsmAnd/res/values-da/phrases.xml
+++ b/OsmAnd/res/values-da/phrases.xml
@@ -1794,4 +1794,27 @@
Zink
Zirkon
+Vådområde
+ Mose
+ Marsk
+ Siv
+ Sump
+ Saltsyderiet
+ Vade
+ Strandeng
+ Mangrove
+ Højmose
+ Lavmose
+ Pals
+ Mudder
+
+ Strandtype: sand
+ Strandtype: rullesten
+ Strandtype: stenet
+
+ Skorsten
+ Palme
+ Cypres
+ Flagstang
+
diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index e54046fd4a..1da91319e0 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -2165,4 +2165,6 @@
Vis banner for gratis version
"Selvom du har en betalt version kan du stadig se banner for den gratis version"
Henter - %1$d fil
+ KØB
+Relieflag deaktiveret
diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml
index e85c1a6c2e..fd4293ae19 100644
--- a/OsmAnd/res/values-it/strings.xml
+++ b/OsmAnd/res/values-it/strings.xml
@@ -2209,4 +2209,6 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
Mostra il banner della versione gratuita
Anche se hai la versione a pagamento puoi comunque vedere il banner della versione gratuita
In download - %1$d file
-
+ Livello Ombreggiatura rilievi disabilitato
+ ACQUISTA
+
diff --git a/OsmAnd/res/values-zh-rTW/phrases.xml b/OsmAnd/res/values-zh-rTW/phrases.xml
index cb0ed3f607..fe518d7feb 100644
--- a/OsmAnd/res/values-zh-rTW/phrases.xml
+++ b/OsmAnd/res/values-zh-rTW/phrases.xml
@@ -1632,5 +1632,15 @@
無二手商品
只有二手商品
- 零件
+ 零配件
+ 經銷商
+ 維修
+ 無維修
+ 電動車維修
+ 機車維修
+ 自助服務
+ 無自助服務
+ 自動化
+ 無自動化
+ 全方位服務
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index dc205bbc98..63a10e0075 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -2144,4 +2144,5 @@
顯示免費版標題
即使您已是付費版本,您仍然可以看到免費版本的標題
正在下載 - %1$d 檔案
-
+ 購買
+
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index fb1ca8ed06..64b4d872fb 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
+ Hillshade layer disabled
Contour lines disabled
Add new
Select category
diff --git a/OsmAnd/src/net/osmand/plus/WorldRegion.java b/OsmAnd/src/net/osmand/plus/WorldRegion.java
index fc78b63f54..b39d6aa8b1 100644
--- a/OsmAnd/src/net/osmand/plus/WorldRegion.java
+++ b/OsmAnd/src/net/osmand/plus/WorldRegion.java
@@ -105,7 +105,7 @@ public class WorldRegion implements Serializable {
}
public void initWorld() {
- regionId = null;
+ regionId = "";
downloadsIdPrefix = "world_";
name = null;
superregion = null;
@@ -284,11 +284,11 @@ public class WorldRegion implements Serializable {
}
public WorldRegion getRegionById(String regionId) {
- if (regionId == null) {
+ if (regionId.length() == 0) {
return this;
} else {
for (WorldRegion region : flattenedSubregions) {
- if (region.getRegionId().equals(regionId)) {
+ if (region != null && region.getRegionId().equals(regionId)) {
return region;
}
}
diff --git a/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java
index 16c30103ec..4ecfe26895 100644
--- a/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java
+++ b/OsmAnd/src/net/osmand/plus/download/BaseDownloadActivity.java
@@ -124,12 +124,7 @@ public class BaseDownloadActivity extends ActionBarProgressActivity {
}
public ItemsListBuilder getItemsBuilder() {
- if (downloadListIndexThread.isDataPrepared()) {
- return new ItemsListBuilder(getMyApplication(), null, downloadListIndexThread.getResourcesByRegions(),
- downloadListIndexThread.getVoiceRecItems(), downloadListIndexThread.getVoiceTTSItems());
- } else {
- return null;
- }
+ return getItemsBuilder("");
}
public ItemsListBuilder getItemsBuilder(String regionId) {
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
index 0f2775d967..bdd64a221d 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java
@@ -30,35 +30,41 @@ public class DownloadActivityType implements Parcelable {
private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.yyyy");
private static Map byTag = new HashMap<>();
- public static final DownloadActivityType NORMAL_FILE = new DownloadActivityType(R.string.download_regular_maps, "map");
+ public static final DownloadActivityType NORMAL_FILE =
+ new DownloadActivityType(R.string.download_regular_maps, "map", 10);
public static final DownloadActivityType VOICE_FILE =
- new DownloadActivityType(R.string.voices, R.drawable.ic_action_volume_up, "voice");
- public static final DownloadActivityType ROADS_FILE = new DownloadActivityType(R.string.download_roads_only_maps, "road_map");
+ new DownloadActivityType(R.string.voices, R.drawable.ic_action_volume_up, "voice", 20);
+ public static final DownloadActivityType ROADS_FILE =
+ new DownloadActivityType(R.string.download_roads_only_maps, "road_map", 30);
public static final DownloadActivityType SRTM_COUNTRY_FILE =
new DownloadActivityType(R.string.download_srtm_maps,
- R.drawable.ic_plugin_srtm, "srtm_map");
+ R.drawable.ic_plugin_srtm, "srtm_map", 40);
public static final DownloadActivityType HILLSHADE_FILE =
new DownloadActivityType(R.string.download_hillshade_maps,
- R.drawable.ic_action_hillshade_dark, "hillshade");
+ R.drawable.ic_action_hillshade_dark, "hillshade", 50);
public static final DownloadActivityType WIKIPEDIA_FILE =
new DownloadActivityType(R.string.download_wikipedia_maps,
- R.drawable.ic_world_globe_dark, "wikimap");
- public static final DownloadActivityType LIVE_UPDATES_FILE = new DownloadActivityType(R.string.download_live_updates, "live_updates");
+ R.drawable.ic_world_globe_dark, "wikimap", 60);
+ public static final DownloadActivityType LIVE_UPDATES_FILE =
+ new DownloadActivityType(R.string.download_live_updates, "live_updates", 70);
private final int stringResource;
private final int iconResource;
private String tag;
+ private int orderIndex;
- public DownloadActivityType(int stringResource, int iconResource, String tag) {
+ public DownloadActivityType(int stringResource, int iconResource, String tag, int orderIndex) {
this.stringResource = stringResource;
this.tag = tag;
+ this.orderIndex = orderIndex;
byTag.put(tag, this);
this.iconResource = iconResource;
}
- public DownloadActivityType(int stringResource, String tag) {
+ public DownloadActivityType(int stringResource, String tag, int orderIndex) {
this.stringResource = stringResource;
this.tag = tag;
+ this.orderIndex = orderIndex;
byTag.put(tag, this);
iconResource = R.drawable.ic_map;
}
@@ -74,7 +80,10 @@ public class DownloadActivityType implements Parcelable {
public String getTag() {
return tag;
}
-
+
+ public int getOrderIndex() {
+ return orderIndex;
+ }
public static boolean isCountedInDownloads(IndexItem es) {
DownloadActivityType tp = es.getType();
diff --git a/OsmAnd/src/net/osmand/plus/download/IndexItem.java b/OsmAnd/src/net/osmand/plus/download/IndexItem.java
index ce54f4166c..574fb69228 100644
--- a/OsmAnd/src/net/osmand/plus/download/IndexItem.java
+++ b/OsmAnd/src/net/osmand/plus/download/IndexItem.java
@@ -38,7 +38,7 @@ public class IndexItem implements Comparable, HasName, Parcelable {
public IndexItem(String fileName, String description, long timestamp, String size, long contentSize,
long containerSize, DownloadActivityType tp) {
this.fileName = fileName;
- this.simplifiedFileName = fileName.toLowerCase().replace("_2.", ".");
+ this.simplifiedFileName = fileName.toLowerCase().replace("_2.", ".").replace("hillshade_", "");
this.description = description;
this.timestamp = timestamp;
this.size = size;
diff --git a/OsmAnd/src/net/osmand/plus/download/items/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/items/ItemViewHolder.java
index 183a644ad4..2274dc820c 100644
--- a/OsmAnd/src/net/osmand/plus/download/items/ItemViewHolder.java
+++ b/OsmAnd/src/net/osmand/plus/download/items/ItemViewHolder.java
@@ -90,8 +90,13 @@ public class ItemViewHolder {
rightButtonAction = RightButtonAction.ASK_FOR_SEAMARKS_PLUGIN;
disabled = true;
}
- if (indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE && srtmDisabled) {
- nameTextView.setText(context.getString(R.string.srtm_plugin_disabled));
+ if ((indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE ||
+ indexItem.getType() == DownloadActivityType.HILLSHADE_FILE) && srtmDisabled) {
+ if (indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE) {
+ nameTextView.setText(context.getString(R.string.srtm_plugin_disabled));
+ } else {
+ nameTextView.setText(context.getString(R.string.hillshade_layer_disabled));
+ }
OsmandPlugin srtmPlugin = OsmandPlugin.getPlugin(SRTMPlugin.class);
if (srtmPlugin == null || srtmPlugin.needsInstallation()) {
rightButtonAction = RightButtonAction.ASK_FOR_SRTM_PLUGIN_PURCHASE;
@@ -110,7 +115,8 @@ public class ItemViewHolder {
}
}
- if (!showTypeInTitle && indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE && srtmDisabled) {
+ if (!showTypeInTitle && (indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE ||
+ indexItem.getType() == DownloadActivityType.HILLSHADE_FILE) && srtmDisabled) {
descrTextView.setText(indexItem.getType().getString(context));
} else if (showTypeInDesc) {
descrTextView.setText(indexItem.getType().getString(context) + " • " + indexItem.getSizeDescription(context));
diff --git a/OsmAnd/src/net/osmand/plus/download/items/ItemsListBuilder.java b/OsmAnd/src/net/osmand/plus/download/items/ItemsListBuilder.java
index b99478d549..01a55c8226 100644
--- a/OsmAnd/src/net/osmand/plus/download/items/ItemsListBuilder.java
+++ b/OsmAnd/src/net/osmand/plus/download/items/ItemsListBuilder.java
@@ -1,6 +1,8 @@
package net.osmand.plus.download.items;
import android.content.Context;
+import android.os.Parcel;
+import android.os.Parcelable;
import net.osmand.PlatformUtil;
import net.osmand.map.OsmandRegions;
@@ -13,6 +15,7 @@ import net.osmand.plus.download.IndexItem;
import net.osmand.plus.srtmplugin.SRTMPlugin;
import net.osmand.util.Algorithms;
+import java.io.Serializable;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
@@ -76,14 +79,14 @@ public class ItemsListBuilder {
str1 = ((WorldRegion) obj1).getName();
} else {
ResourceItem item = (ResourceItem) obj1;
- str1 = item.title + item.getIndexItem().getType().getTag();
+ str1 = item.title + item.getIndexItem().getType().getOrderIndex();
}
if (obj2 instanceof WorldRegion) {
str2 = ((WorldRegion) obj2).getName();
} else {
ResourceItem item = (ResourceItem) obj2;
- str2 = item.title + item.getIndexItem().getType().getTag();
+ str2 = item.title + item.getIndexItem().getType().getOrderIndex();
}
return str1.compareTo(str2);
@@ -91,8 +94,9 @@ public class ItemsListBuilder {
}
public enum VoicePromptsType {
+ NONE,
RECORDED,
- TTS
+ TTS;
}
private static final org.apache.commons.logging.Log LOG = PlatformUtil.getLog(ItemsListBuilder.class);
@@ -106,6 +110,7 @@ public class ItemsListBuilder {
private boolean srtmDisabled;
private boolean hasSrtm;
+ private boolean hasHillshade;
public List getRegionMapItems() {
return regionMapItems;
@@ -190,6 +195,7 @@ public class ItemsListBuilder {
private void collectSubregionsDataAndItems() {
srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null;
hasSrtm = false;
+ hasHillshade = false;
// Collect all regions (and their parents) that have at least one
// resource available in repository or locally.
@@ -230,11 +236,19 @@ public class ItemsListBuilder {
resItem.setTitle(name);
if (region != this.region && srtmDisabled) {
- if (hasSrtm && indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE)
- continue;
-
- if (!hasSrtm && indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE)
- hasSrtm = true;
+ if (indexItem.getType() == DownloadActivityType.SRTM_COUNTRY_FILE) {
+ if (hasSrtm) {
+ continue;
+ } else {
+ hasSrtm = true;
+ }
+ } else if (indexItem.getType() == DownloadActivityType.HILLSHADE_FILE) {
+ if (hasHillshade) {
+ continue;
+ } else {
+ hasHillshade = true;
+ }
+ }
}
diff --git a/OsmAnd/src/net/osmand/plus/download/items/RegionDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/items/RegionDialogFragment.java
index 60d9e43c5b..aeca03d443 100644
--- a/OsmAnd/src/net/osmand/plus/download/items/RegionDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/download/items/RegionDialogFragment.java
@@ -45,6 +45,8 @@ public class RegionDialogFragment extends DialogFragment {
if (regionId == null) {
regionId = getArguments().getString(REGION_ID_DLG_KEY);
}
+ if (regionId == null)
+ regionId = "";
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
@@ -55,7 +57,7 @@ public class RegionDialogFragment extends DialogFragment {
}
});
- if (regionId != null) {
+ if (regionId.length() > 0) {
Fragment fragment = getChildFragmentManager().findFragmentById(R.id.fragmentContainer);
if (fragment == null) {
getChildFragmentManager().beginTransaction().add(R.id.fragmentContainer,
diff --git a/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java b/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java
index afd13b8f41..8120415e58 100644
--- a/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java
@@ -64,12 +64,15 @@ public class RegionItemsFragment extends OsmandExpandableListFragment {
regionId = getArguments().getString(REGION_ID_KEY);
}
+ if (regionId == null)
+ regionId = "";
+
ExpandableListView listView = (ExpandableListView) view.findViewById(android.R.id.list);
listAdapter = new RegionsItemsAdapter(getActivity());
listView.setAdapter(listAdapter);
setListView(listView);
- if (regionId != null) {
+ if (regionId.length() > 0) {
ItemsListBuilder builder = getDownloadActivity().getItemsBuilder(regionId);
if (builder != null && builder.build()) {
fillRegionItemsAdapter(builder);
diff --git a/OsmAnd/src/net/osmand/plus/download/items/VoiceItemsFragment.java b/OsmAnd/src/net/osmand/plus/download/items/VoiceItemsFragment.java
deleted file mode 100644
index 5c185271aa..0000000000
--- a/OsmAnd/src/net/osmand/plus/download/items/VoiceItemsFragment.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package net.osmand.plus.download.items;
-
-public class VoiceItemsFragment {
-}