diff --git a/DataExtractionOSM/src/net/osmand/ToDoConstants.java b/DataExtractionOSM/src/net/osmand/ToDoConstants.java index e3231fa30a..b22b46290a 100644 --- a/DataExtractionOSM/src/net/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/net/osmand/ToDoConstants.java @@ -8,6 +8,8 @@ package net.osmand; public class ToDoConstants { + // MAKE worldwide downloadable by default + // Index // Map QuadTree (skip small areas!!!) // Routing index !! diff --git a/OsmAnd/res/layout/titlebar.xml b/OsmAnd/res/layout/titlebar.xml index 07a8036a15..a6c6429801 100644 --- a/OsmAnd/res/layout/titlebar.xml +++ b/OsmAnd/res/layout/titlebar.xml @@ -36,8 +36,8 @@ android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_centerVertical="true" - android:layout_marginLeft="22dp" - android:layout_marginRight="22dp" + android:layout_marginLeft="15dp" + android:layout_marginRight="15dp" android:layout_toLeftOf="@+id/title_image" android:layout_toRightOf="@+id/back_button" android:text="@string/favourites_activity" /> diff --git a/OsmAnd/res/layout/titlebar_extrabutton.xml b/OsmAnd/res/layout/titlebar_extrabutton.xml index f179c86d5e..8c08a6cd6c 100644 --- a/OsmAnd/res/layout/titlebar_extrabutton.xml +++ b/OsmAnd/res/layout/titlebar_extrabutton.xml @@ -23,8 +23,8 @@ android:layout_height="wrap_content" android:gravity="center_vertical" android:layout_centerVertical="true" - android:layout_marginLeft="22dp" - android:layout_marginRight="22dp" + android:layout_marginLeft="15dp" + android:layout_marginRight="15dp" android:layout_toLeftOf="@+id/title_image" android:layout_toRightOf="@+id/back_button" android:text="@string/favourites_activity" /> diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index d607a3676d..cfa71d3987 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -8,6 +8,12 @@ If you are making/correcting english translations make sure : 1. All your modified/created strings are in the top of the file (to make easier find what's translated). --> + Nothing was found. If you can\'t find your region manually, you can make it yourself (see osmand.net). + Online Map data + Offline Map data + (includes GPX analyzer) + Download, view details and manage offline maps + Download, (de-)activate, or delete offline data. \nTo see more details click on the item. \nCurrent data on device (%1$s free): Enable online maps plugin to select different map sources Online maps Use online maps (download and save them on sdcard) @@ -31,7 +37,7 @@ Osmand Development Plugin Manager Touch a Plugin to activate or deactivate it. (Restarting Osmand may be required.) - Plugins provide extra functionality already contained in the application like tracking, tile maps, screen off mode, accessibility settings, and others. + Plugins provide extra functionality bundled within the application like tracking, tile maps, screen off mode, accessibility settings, and others. Plugin Manager Changes in 0.8.0 : \n\t- Plugin functionality @@ -197,7 +203,7 @@ Profile Specific Settings User Profile - Select a user profile. Each profile contains specific settings, which can be customized below. + Select a user profile. Each profile contains the set of specific settings. - Tracking Specify tracking settings @@ -205,7 +211,6 @@ Specify navigation options Global Settings Offline Data (Download) - Download and manage offline maps and other data such as GPX tracks General Settings Configure global settings Global app settings @@ -316,7 +321,6 @@ Show on map Online Nominatim Select - Download, (de-)activate, or delete offline data. \nCurrent data on device (%1$s free): Searching position… Position (Found) Address… @@ -394,8 +398,6 @@ Voice data (TTS) Voice data (recorded) GPX data - Map data (tiles) - Map data (vector) POI data TTS Voice @@ -786,7 +788,6 @@ Downloading… Downloading list of available regions… The list of regions was not retrieved from osmand.net. - If you can\'t find your region, you can make it yourself. See osmand.net Show on map Favorite point was edited No favorite points exist diff --git a/OsmAnd/res/xml/settings_pref.xml b/OsmAnd/res/xml/settings_pref.xml index 8d9929d479..494f60865b 100644 --- a/OsmAnd/res/xml/settings_pref.xml +++ b/OsmAnd/res/xml/settings_pref.xml @@ -1,6 +1,7 @@ - + + @@ -34,7 +35,6 @@ - diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index 9d1c7764dd..3bb91d9d18 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -703,7 +703,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity { final Map cats = new TreeMap(); for(IndexItem i : indexItems){ int nameId = R.string.index_name_other; - int order = 12; + int order = 0; String lc = i.getFileName().toLowerCase(); if(lc.endsWith(".voice.zip")) { nameId = R.string.index_name_voice; @@ -893,6 +893,12 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity { item.setText(group.name); item.setLinkTextColor(Color.YELLOW); adjustIndicator(groupPosition, isExpanded, v); + int cp = getChildrenCount(groupPosition); + if(cp < 10 && !isExpanded) { + getExpandableListView().expandGroup(groupPosition); + } else if(cp > 50 && isExpanded){ + getExpandableListView().collapseGroup(groupPosition); + } return row; } diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java index 3b34296f3e..21e4e0269a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexHelper.java @@ -391,8 +391,8 @@ public class LocalIndexHelper { public enum LocalIndexType { - TILES_DATA(R.string.local_indexes_cat_tile), MAP_DATA(R.string.local_indexes_cat_map), + TILES_DATA(R.string.local_indexes_cat_tile), POI_DATA(R.string.local_indexes_cat_poi), VOICE_DATA(R.string.local_indexes_cat_voice), TTS_VOICE_DATA(R.string.local_indexes_cat_tts), diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java index 549a34e14f..3f3f911f6f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java @@ -33,6 +33,9 @@ import android.os.AsyncTask; import android.os.AsyncTask.Status; import android.os.Bundle; import android.os.StatFs; +import android.text.SpannableString; +import android.text.method.LinkMovementMethod; +import android.text.style.ClickableSpan; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.LayoutInflater; @@ -83,6 +86,8 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { }); setContentView(R.layout.local_index); titleBar.afterSetContentView(); + + settings = getMyApplication().getSettings(); descriptionLoader = new LoadLocalIndexDescriptionTask(); listAdapter = new LocalIndexesAdapter(); @@ -671,8 +676,22 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { StatFs fs = new StatFs(dir.getAbsolutePath()); size = formatGb.format(new Object[]{(float) (fs.getAvailableBlocks()) * fs.getBlockSize() / (1 << 30) }); } - ((TextView) findViewById(R.id.DescriptionText)).setText( - getString(R.string.local_index_description, size)); + TextView ds = (TextView) findViewById(R.id.DescriptionText); + String text = getString(R.string.local_index_description, size); + int l = text.indexOf(','); + if(l == -1) { + l = text.length(); + } + SpannableString content = new SpannableString(text); + content.setSpan(new ClickableSpan() { + @Override + public void onClick(View widget) { + asyncLoader.setResult(null); + startActivity(new Intent(LocalIndexesActivity.this, DownloadIndexActivity.class)); + } + }, 0, l, 0); + ds.setText(content); + ds.setMovementMethod(LinkMovementMethod.getInstance()); } private void closeSelectionMode(){ diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java index d7648e40d7..6b12eaca94 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java @@ -655,6 +655,10 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference title = title.substring(1); } scr.getDialog().setTitle(" " + title + " [" + osmandSettings.APPLICATION_MODE.get().toHumanString(this) + "]"); + } else if(preference instanceof PreferenceScreen){ + PreferenceScreen scr = (PreferenceScreen)preference; + String title = scr.getTitle().toString(); + scr.getDialog().setTitle(" " + title); } if (preference == applicationDir) { diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 36603ca11a..ee998fe237 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -1,5 +1,8 @@ package net.osmand.plus.monitoring; +import org.apache.commons.logging.Log; + +import net.osmand.LogUtil; import net.osmand.plus.ContextMenuAdapter; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; @@ -22,6 +25,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { private static final String ID = "osmand.monitoring"; private OsmandSettings settings; private OsmandApplication app; + private static final Log log = LogUtil.getLog(OsmandMonitoringPlugin.class); public OsmandMonitoringPlugin(OsmandApplication app) { this.app = app; @@ -69,6 +73,12 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { @Override public void settingsActivityCreate(final SettingsActivity activity, PreferenceScreen screen) { + Preference offlineData = screen.findPreference("index_settings"); + if(offlineData == null) { + log.error("OsmandMonitoringPlugin: Index settings preference not found !!!"); + } else { + offlineData.setSummary(offlineData.getSummary() + " "+ app.getString(R.string.gpx_index_settings_descr)); + } PreferenceScreen grp = screen.getPreferenceManager().createPreferenceScreen(activity); grp.setTitle(R.string.monitor_preferences); grp.setSummary(R.string.monitor_preferences_descr);