commit
f3fcc04f67
6 changed files with 32 additions and 7 deletions
|
@ -114,9 +114,11 @@ public class RoutingConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addImpassableRoad(RouteDataObject r) {
|
public void addImpassableRoad(RouteDataObject r) {
|
||||||
|
if (!impassableRoadIds.contains(r.id)){
|
||||||
impassableRoadIds.add(r.id);
|
impassableRoadIds.add(r.id);
|
||||||
impassableRoads.add(r);
|
impassableRoads.add(r);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String getAttribute(VehicleRouter router, String propertyName) {
|
private String getAttribute(VehicleRouter router, String propertyName) {
|
||||||
|
|
|
@ -298,6 +298,8 @@ public class MapActivityLayers {
|
||||||
if (!settings.SAVE_TRACK_TO_GPX.get() && !
|
if (!settings.SAVE_TRACK_TO_GPX.get() && !
|
||||||
settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
|
settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
|
||||||
AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show();
|
AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
g.path = getString(R.string.show_current_gpx_title);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||||
import com.actionbarsherlock.view.Window;
|
import com.actionbarsherlock.view.Window;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.access.AccessibleAlertBuilder;
|
import net.osmand.access.AccessibleAlertBuilder;
|
||||||
|
import net.osmand.map.OsmandRegions;
|
||||||
import net.osmand.plus.*;
|
import net.osmand.plus.*;
|
||||||
import net.osmand.plus.activities.FavouritesActivity;
|
import net.osmand.plus.activities.FavouritesActivity;
|
||||||
import net.osmand.plus.activities.LocalIndexInfo;
|
import net.osmand.plus.activities.LocalIndexInfo;
|
||||||
|
@ -596,4 +597,20 @@ public class DownloadActivity extends SherlockFragmentActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getFullName(IndexItem e, OsmandApplication app, OsmandRegions osmandRegions) {
|
||||||
|
String eName;
|
||||||
|
List<IndexItem> forCat = new ArrayList<IndexItem>();
|
||||||
|
forCat.add(e);
|
||||||
|
List<IndexItemCategory> category = IndexItemCategory.categorizeIndexItems(app, forCat);
|
||||||
|
if (category.size() != 0){
|
||||||
|
eName = e.getVisibleDescription(app) + "\n"
|
||||||
|
+ category.get(0).name + " "
|
||||||
|
+ e.getVisibleName(app, osmandRegions);
|
||||||
|
} else {
|
||||||
|
eName = e.getVisibleDescription(app) + "\n"
|
||||||
|
+ e.getVisibleName(app, osmandRegions);
|
||||||
|
}
|
||||||
|
return eName;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -961,8 +961,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
|
||||||
|
|
||||||
private String getNameToDisplay(LocalIndexInfo child) {
|
private String getNameToDisplay(LocalIndexInfo child) {
|
||||||
String mapDescr = getMapDescription(child.getFileName());
|
String mapDescr = getMapDescription(child.getFileName());
|
||||||
String mapName = FileNameTranslationHelper.getFileName(ctx, ((OsmandApplication) getDownloadActivity().getApplication()).getResourceManager().getOsmandRegions(), child.getFileName());
|
String mapName = FileNameTranslationHelper.getFileName(ctx,
|
||||||
|
((OsmandApplication) getDownloadActivity().getApplication()).getResourceManager().getOsmandRegions(),
|
||||||
|
child.getFileName());
|
||||||
if (mapDescr.length() > 0){
|
if (mapDescr.length() > 0){
|
||||||
return mapDescr + " - " + mapName;
|
return mapDescr + " - " + mapName;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -202,7 +202,8 @@ public class UpdatesIndexFragment extends SherlockListFragment {
|
||||||
TextView name = (TextView) v.findViewById(R.id.download_item);
|
TextView name = (TextView) v.findViewById(R.id.download_item);
|
||||||
TextView description = (TextView) v.findViewById(R.id.download_descr);
|
TextView description = (TextView) v.findViewById(R.id.download_descr);
|
||||||
IndexItem e = items.get(position);
|
IndexItem e = items.get(position);
|
||||||
String eName = e.getVisibleDescription(getMyApplication()) + "\n" + e.getVisibleName(getMyApplication(), osmandRegions);
|
String eName = DownloadActivity.getFullName(e, getMyApplication(), osmandRegions);
|
||||||
|
|
||||||
name.setText(eName.trim()); //$NON-NLS-1$
|
name.setText(eName.trim()); //$NON-NLS-1$
|
||||||
String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication());
|
String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication());
|
||||||
description.setText(d);
|
description.setText(d);
|
||||||
|
|
|
@ -141,7 +141,8 @@ public class GpxUiHelper {
|
||||||
if(showCurrentGpx){
|
if(showCurrentGpx){
|
||||||
allGpxList.add(0, activity.getString(R.string.show_current_gpx_title));
|
allGpxList.add(0, activity.getString(R.string.show_current_gpx_title));
|
||||||
}
|
}
|
||||||
final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity,allGpxList, selectedGpxList, multipleChoice);
|
final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity, allGpxList, selectedGpxList, multipleChoice);
|
||||||
|
|
||||||
return createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter);
|
return createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -166,7 +167,8 @@ public class GpxUiHelper {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List<String> allGpxList, List<String> selectedGpxList, boolean multipleChoice) {
|
private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List<String> allGpxList,
|
||||||
|
List<String> selectedGpxList, boolean multipleChoice) {
|
||||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
|
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
|
||||||
//element position in adapter
|
//element position in adapter
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
Loading…
Reference in a new issue