diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 1317e7e7bf..0e7d9cbef3 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1999,4 +1999,5 @@ Kort over %1$ s er hentet. Gå tilbage til kortet for at begynde at bruge det. Gå til kortet QR kode - + Indtast landenavn + diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 6020b96c93..929b22984b 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1,4 +1,5 @@ -Modifications hors-ligne + +Modifications hors-ligne Toujours utiliser l\'édition hors-ligne Les modifications de PI dans l\'application sont sans effet sur les cartes téléchargées, les modifications sont enregistrées dans un fichier. @@ -2073,4 +2074,6 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et Carte téléchargée Aller à la carte La carte %1$s a été téléchargée. Allez à la carte pour l’utiliser. - \ No newline at end of file + QR-code + Saisissez le pays + diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index d33e42d44b..60c7c27b13 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 + +För att låsa upp skärmen tryck på låsikonen Välj land Välj stad Välj byggnad @@ -1950,4 +1951,5 @@ Karta hämtad Karta över %1$s har hämtats. Gå tillbaka till kartan för att börja använda den. Gå till kartan - \ No newline at end of file + QR-kod + diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 0819d84db3..4f1922e60a 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -24,6 +24,7 @@ import net.osmand.access.AccessibleToast; import net.osmand.map.WorldRegion; import net.osmand.map.WorldRegion.RegionParams; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings.DrivingRegion; import net.osmand.plus.OsmandSettings.MetricsConstants; @@ -41,6 +42,8 @@ import net.osmand.plus.download.ui.DownloadResourceGroupFragment; import net.osmand.plus.download.ui.GoToMapFragment; import net.osmand.plus.download.ui.LocalIndexesFragment; import net.osmand.plus.download.ui.UpdatesIndexFragment; +import net.osmand.plus.openseamapsplugin.NauticalMapsPlugin; +import net.osmand.plus.srtmplugin.SRTMPlugin; import net.osmand.plus.views.controls.PagerSlidingTabStrip; import org.apache.commons.logging.Log; @@ -85,6 +88,11 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl private DownloadValidationManager downloadValidationManager; protected WorldRegion downloadItem; + private boolean srtmDisabled; + private boolean srtmNeedsInstallation; + private boolean nauticalPluginDisabled; + private boolean freeVersion; + @Override protected void onCreate(Bundle savedInstanceState) { getMyApplication().applyTheme(this); @@ -173,6 +181,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl @Override protected void onResume() { super.onResume(); + initAppStatusVariables(); getMyApplication().getAppCustomization().resumeActivity(DownloadActivity.class, this); downloadThread.setUiActivity(this); downloadInProgress(); @@ -614,4 +623,29 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl messageTextView.setText(R.string.device_memory); } + + public boolean isSrtmDisabled() { + return srtmDisabled; + } + + public boolean isSrtmNeedsInstallation() { + return srtmNeedsInstallation; + } + + public boolean isNauticalPluginDisabled() { + return nauticalPluginDisabled; + } + + public boolean isFreeVersion() { + return freeVersion; + } + + public void initAppStatusVariables() { + srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null; + nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null; + freeVersion = Version.isFreeVersion(getMyApplication()); + OsmandPlugin srtmPlugin = OsmandPlugin.getPlugin(SRTMPlugin.class); + srtmNeedsInstallation = srtmPlugin == null || srtmPlugin.needsInstallation(); + + } } diff --git a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java index 87bc425d11..a7c91fe22d 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/ItemViewHolder.java @@ -33,7 +33,6 @@ import net.osmand.plus.download.DownloadResources; import net.osmand.plus.download.IndexItem; import net.osmand.plus.download.ui.LocalIndexesFragment.LocalIndexOperationTask; import net.osmand.plus.helpers.FileNameTranslationHelper; -import net.osmand.plus.openseamapsplugin.NauticalMapsPlugin; import net.osmand.plus.srtmplugin.SRTMPlugin; import java.io.File; @@ -121,14 +120,11 @@ public class ItemViewHolder { this.showTypeInName = showTypeInName; } - - // FIXME don't initialize on every row private void initAppStatusVariables() { - srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null; - nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null; - freeVersion = Version.isFreeVersion(context.getMyApplication()); - OsmandPlugin srtmPlugin = OsmandPlugin.getPlugin(SRTMPlugin.class); - srtmNeedsInstallation = srtmPlugin == null || srtmPlugin.needsInstallation(); + srtmDisabled = context.isSrtmDisabled(); + nauticalPluginDisabled = context.isNauticalPluginDisabled(); + freeVersion = context.isFreeVersion(); + srtmNeedsInstallation = context.isSrtmNeedsInstallation(); } public void bindIndexItem(final IndexItem indexItem, final DownloadResourceGroup parentOptional) {