Add Icon mute on/off. Add redownload list from internet
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.osmand.swing.OsmExtractionUI"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DataExtractionOSM"/>
|
||||
</launchConfiguration>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.osmand.swing.OsmExtractionUI"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DataExtractionOSM"/>
|
||||
</launchConfiguration>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.android.ide.eclipse.adt.debug.LaunchConfigType">
|
||||
<intAttribute key="com.android.ide.eclipse.adt.action" value="0"/>
|
||||
<stringAttribute key="com.android.ide.eclipse.adt.commandline" value=""/>
|
||||
<intAttribute key="com.android.ide.eclipse.adt.delay" value="0"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.nobootanim" value="false"/>
|
||||
<intAttribute key="com.android.ide.eclipse.adt.speed" value="0"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.target" value="true"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.wipedata" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/OsmAnd"/>
|
||||
<listEntry value="/OsmAnd/AndroidManifest.xml"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ALLOW_TERMINATE" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="OsmAnd"/>
|
||||
</launchConfiguration>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.android.ide.eclipse.adt.debug.LaunchConfigType">
|
||||
<intAttribute key="com.android.ide.eclipse.adt.action" value="0"/>
|
||||
<stringAttribute key="com.android.ide.eclipse.adt.commandline" value=""/>
|
||||
<intAttribute key="com.android.ide.eclipse.adt.delay" value="0"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.nobootanim" value="false"/>
|
||||
<intAttribute key="com.android.ide.eclipse.adt.speed" value="0"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.target" value="true"/>
|
||||
<booleanAttribute key="com.android.ide.eclipse.adt.wipedata" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/OsmAnd"/>
|
||||
<listEntry value="/OsmAnd/AndroidManifest.xml"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ALLOW_TERMINATE" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="OsmAnd"/>
|
||||
</launchConfiguration>
|
||||
|
|
BIN
OsmAnd/res/drawable-hdpi/list_activities_route.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
OsmAnd/res/drawable-hdpi/sound_icon_off.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/sound_icon_on.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
OsmAnd/res/drawable-large/list_activities_route.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
OsmAnd/res/drawable-mdpi/list_activities_route.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
OsmAnd/res/drawable/sound_icon_off.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
OsmAnd/res/drawable/sound_icon_on.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
|
@ -9,6 +9,7 @@
|
|||
1. 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
|
||||
-->
|
||||
<string name="update_downlod_list">Reload list</string>
|
||||
<string name="starting_point_too_far">Starting point too far from nearest road.</string>
|
||||
<string name="shared_location">Shared location</string>
|
||||
<string name="osmand_parking_event">Pick up the car from parking</string>
|
||||
|
@ -447,7 +448,7 @@ You can enable (online or cached) tile map sources, tracking settings, and many
|
|||
<string name="local_index_mi_restore">Activate</string>
|
||||
<string name="local_index_mi_backup">Deactivate</string>
|
||||
<string name="local_index_mi_delete">Delete</string>
|
||||
<string name="local_index_mi_reload">Refresh</string>
|
||||
<string name="local_index_mi_reload">Reload from sdcard</string>
|
||||
<string name="local_index_download">Download…</string>
|
||||
<string name="local_index_tile_data">Tile data: %1$s \nMinimum zoom : %2$d\nMaximum zoom : %3$d\nDownloadable : %4$s \nZooms downloaded : %5$s</string>
|
||||
<string name="local_index_poi_data">POI data</string>
|
||||
|
|
|
@ -40,6 +40,8 @@ public class DownloadOsmandIndexesHelper {
|
|||
IndexFileList result = downloadIndexesListFromInternet(versionUrlParam);
|
||||
if (result == null) {
|
||||
result = new IndexFileList();
|
||||
} else {
|
||||
result.setDownloadedFromInternet(true);
|
||||
}
|
||||
//add all tts files from assets
|
||||
listVoiceAssets(result, amanager, pm, ((OsmandApplication) ctx.getApplicationContext()).getSettings());
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.osmand.plus.DownloadOsmandIndexesHelper.IndexItem;
|
|||
public class IndexFileList implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private boolean downloadedFromInternet = false;
|
||||
IndexItem basemap;
|
||||
TreeMap<String, IndexItem> indexFiles = new TreeMap<String, IndexItem>(new Comparator<String>(){
|
||||
|
||||
|
@ -36,6 +37,14 @@ public class IndexFileList implements Serializable {
|
|||
|
||||
public IndexFileList() {
|
||||
}
|
||||
|
||||
public void setDownloadedFromInternet(boolean downloadedFromInternet) {
|
||||
this.downloadedFromInternet = downloadedFromInternet;
|
||||
}
|
||||
|
||||
public boolean isDownloadedFromInternet() {
|
||||
return downloadedFromInternet;
|
||||
}
|
||||
|
||||
public void setMapVersion(String mapversion) {
|
||||
this.mapversion = mapversion;
|
||||
|
|
|
@ -205,11 +205,12 @@ public class OsmandApplication extends Application {
|
|||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
if (prefferedLocale != null) {
|
||||
if (prefferedLocale != null && !newConfig.locale.getLanguage().equals(prefferedLocale.getLanguage())) {
|
||||
newConfig.locale = prefferedLocale;
|
||||
Locale.setDefault(prefferedLocale);
|
||||
getBaseContext().getResources().updateConfiguration(newConfig, getBaseContext().getResources().getDisplayMetrics());
|
||||
// getBaseContext().getResources().updateConfiguration(newConfig, getBaseContext().getResources().getDisplayMetrics());
|
||||
} else {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import net.osmand.LogUtil;
|
|||
import net.osmand.Version;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.IndexConstants;
|
||||
import net.osmand.osm.OSMSettings;
|
||||
import net.osmand.plus.DownloadOsmandIndexesHelper;
|
||||
import net.osmand.plus.DownloadOsmandIndexesHelper.IndexItem;
|
||||
import net.osmand.plus.IndexFileList;
|
||||
|
@ -168,7 +167,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
}
|
||||
}
|
||||
|
||||
if(downloadListIndexThread.getCachedIndexFiles() != null){
|
||||
if (downloadListIndexThread.getCachedIndexFiles() != null && downloadListIndexThread.isDownloadedFromInternet()) {
|
||||
setListAdapter(new DownloadIndexAdapter(downloadListIndexThread.getCachedIndexFiles()));
|
||||
} else {
|
||||
downloadIndexList();
|
||||
|
@ -197,7 +196,7 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
menu.clear();
|
||||
menu.add(0, RELOAD_ID, 0, R.string.reload);
|
||||
menu.add(0, RELOAD_ID, 0, R.string.update_downlod_list);
|
||||
if (getExpandableListAdapter() != null) {
|
||||
// item.setIcon(R.drawable.ic_menu_refresh);
|
||||
menu.add(0, SELECT_ALL_ID, 0, R.string.select_all);
|
||||
|
@ -268,6 +267,10 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
|
|||
return indexFiles != null ? indexFiles.getIndexFiles() : null;
|
||||
}
|
||||
|
||||
public boolean isDownloadedFromInternet(){
|
||||
return indexFiles != null && indexFiles.isDownloadedFromInternet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
indexFiles = DownloadOsmandIndexesHelper.getIndexesList(ctx);
|
||||
|
|
|
@ -275,7 +275,7 @@ public class MapActivityLayers {
|
|||
getApplication().getGpxFileToDisplay() != null ? 1 : 0, R.drawable.list_activities_gpx_tracks);
|
||||
if(routeInfoLayer.couldBeVisible()){
|
||||
adapter.registerSelectedItem(R.string.layer_route,
|
||||
routeInfoLayer.isUserDefinedVisible() ? 1 : 0, 0);
|
||||
routeInfoLayer.isUserDefinedVisible() ? 1 : 0, R.drawable.list_activities_route);
|
||||
}
|
||||
adapter.registerSelectedItem(R.string.layer_transport, settings.SHOW_TRANSPORT_OVER_MAP.get() ? 1 : 0,
|
||||
R.drawable.list_activities_transport_stops);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class RouteAnimation {
|
|||
public void run() {
|
||||
Location current = directions.isEmpty() ? null : new Location(directions.remove(0));
|
||||
Location prev = current;
|
||||
long prevTime = current.getTime();
|
||||
long prevTime = current == null ? 0 : current.getTime();
|
||||
float meters = metersToGoInFiveSteps(directions, current);
|
||||
while (!directions.isEmpty() && routeAnimation != null) {
|
||||
int timeout = (int) (time * 1000);
|
||||
|
|
|
@ -66,6 +66,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
private MapStackControl leftStack;
|
||||
private ViewGroup statusBar;
|
||||
private MapInfoControl lanesControl;
|
||||
private TextView topText;
|
||||
|
||||
|
||||
|
||||
|
@ -224,8 +225,14 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
@Override
|
||||
public void onDraw(Canvas canvas, RectF latlonBounds, RectF tilesRect, DrawSettings nightMode) {
|
||||
boolean bold = routeLayer.getHelper().isFollowingMode();
|
||||
int color = !nightMode.isNightMode() ? Color.BLACK : Color.BLACK;
|
||||
if(paintText.getColor() != color) {
|
||||
paintText.setColor(color);
|
||||
paintSubText.setColor(color);
|
||||
paintSmallText.setColor(color);
|
||||
paintSmallSubText.setColor(color);
|
||||
}
|
||||
if(paintText.isFakeBoldText() != bold) {
|
||||
// TODO night view
|
||||
paintText.setFakeBoldText(true);
|
||||
paintSubText.setFakeBoldText(true);
|
||||
paintSmallText.setFakeBoldText(true);
|
||||
|
@ -239,6 +246,15 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
compassView.invalidate();
|
||||
}
|
||||
lanesControl.updateInfo();
|
||||
// topText.setTextColor(color);
|
||||
// String text = "Пр.Независимости";
|
||||
// float ts = topText.getPaint().measureText(text);
|
||||
// int wth = topText.getRight() /*- compassView.getRight()*/;
|
||||
// while(ts > wth && topText.getTextSize() - 1 > 5) {
|
||||
// topText.setTextSize(topText.getTextSize() - 1);
|
||||
// ts = topText.getPaint().measureText(text);
|
||||
// }
|
||||
// topText.setText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -709,14 +725,15 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
statusBar.addView(compassView, params);
|
||||
|
||||
// Space (future text)
|
||||
params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 1);
|
||||
TextView space = new TextView(view.getContext());
|
||||
statusBar.addView(space, params);
|
||||
params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT, 1);
|
||||
topText = new TextView(view.getContext());
|
||||
topText.setGravity(Gravity.RIGHT);
|
||||
statusBar.addView(topText, params);
|
||||
|
||||
// Map and progress icon
|
||||
Drawable globusDrawable = view.getResources().getDrawable(R.drawable.globus);
|
||||
|
||||
params = new LinearLayout.LayoutParams(globusDrawable.getMinimumWidth(), globusDrawable.getMinimumHeight());
|
||||
params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
FrameLayout fl = new FrameLayout(view.getContext());
|
||||
statusBar.addView(fl, params);
|
||||
|
||||
|
|