Merge pull request #6594 from osmandapp/RouteInfoDetails

Route info details
This commit is contained in:
Alexey 2019-03-01 16:37:43 +03:00 committed by GitHub
commit 2a95587c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 3330 additions and 1543 deletions

View file

@ -1,6 +1,12 @@
package net.osmand.router;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
public class RouteStatistics {
@ -39,8 +45,11 @@ public class RouteStatistics {
private final List<RouteSegmentResult> route;
public RouteStatisticComputer(List<RouteSegmentResult> route) {
private final StatisticType type;
public RouteStatisticComputer(List<RouteSegmentResult> route, StatisticType type) {
this.route = route;
this.type = type;
}
protected Map<E, RouteSegmentAttribute<E>> makePartition(List<RouteSegmentAttribute<E>> routeAttributes) {
@ -49,7 +58,7 @@ public class RouteStatistics {
E key = attribute.getAttribute();
RouteSegmentAttribute<E> pattr = partition.get(key);
if (pattr == null) {
pattr = new RouteSegmentAttribute<>(attribute.getIndex(), attribute.getAttribute(), attribute.getColorAttrName());
pattr = new RouteSegmentAttribute<>(attribute);
partition.put(key, pattr);
}
pattr.incrementDistanceBy(attribute.getDistance());
@ -79,8 +88,9 @@ public class RouteStatistics {
index++;
}
if (index >= routes.size()) {
String colorAttrName = determineColor(current);
routes.add(new RouteSegmentAttribute<>(index, current, colorAttrName));
String colorAttrName = getColorAttrName(current);
String colorName = getColorName(current);
routes.add(new RouteSegmentAttribute<>(index, current, colorAttrName, colorName));
}
RouteSegmentAttribute surface = routes.get(index);
surface.incrementDistanceBy(segment.getDistance());
@ -93,19 +103,20 @@ public class RouteStatistics {
List<RouteSegmentAttribute<E>> routeAttributes = processRoute();
Map<E, RouteSegmentAttribute<E>> partition = makePartition(routeAttributes);
float totalDistance = computeTotalDistance(routeAttributes);
return new Statistics<>(routeAttributes, partition, totalDistance);
return new Statistics<>(routeAttributes, partition, totalDistance, type);
}
public abstract E getAttribute(RouteSegmentResult segment);
public abstract String determineColor(E attribute);
public abstract String getColorAttrName(E attribute);
public abstract String getColorName(E attribute);
}
private static class RouteSurfaceStatisticComputer extends RouteStatisticComputer<String> {
public RouteSurfaceStatisticComputer(List<RouteSegmentResult> route) {
super(route);
super(route, StatisticType.SURFACE);
}
@Override
@ -123,21 +134,27 @@ public class RouteStatistics {
}
@Override
public String determineColor(String attribute) {
public String getColorAttrName(String attribute) {
RoadSurface roadSurface = RoadSurface.valueOf(attribute.toUpperCase());
return roadSurface.getColorAttrName();
}
@Override
public String getColorName(String attribute) {
RoadSurface roadSurface = RoadSurface.valueOf(attribute.toUpperCase());
return roadSurface.getColorName();
}
}
private static class RouteSmoothnessStatisticComputer extends RouteStatisticComputer<String> {
public RouteSmoothnessStatisticComputer(List<RouteSegmentResult> route) {
super(route);
super(route, StatisticType.SMOOTHNESS);
}
@Override
public String getAttribute(RouteSegmentResult segment) {
String segmentSmoothness = segment.getSurface();
String segmentSmoothness = segment.getSmoothness();
if (segmentSmoothness == null) {
return RoadSmoothness.UNDEFINED.name().toLowerCase();
}
@ -150,17 +167,22 @@ public class RouteStatistics {
}
@Override
public String determineColor(String attribute) {
public String getColorAttrName(String attribute) {
RoadSmoothness roadSmoothness = RoadSmoothness.valueOf(attribute.toUpperCase());
return roadSmoothness.getColorAttrName();
}
}
@Override
public String getColorName(String attribute) {
RoadSmoothness roadSmoothness = RoadSmoothness.valueOf(attribute.toUpperCase());
return roadSmoothness.getColorName();
}
}
private static class RouteClassStatisticComputer extends RouteStatisticComputer<String> {
public RouteClassStatisticComputer(List<RouteSegmentResult> route) {
super(route);
super(route, StatisticType.CLASS);
}
@Override
@ -178,12 +200,17 @@ public class RouteStatistics {
}
@Override
public String determineColor(String attribute) {
public String getColorAttrName(String attribute) {
RoadClass roadClass = RoadClass.valueOf(attribute.toUpperCase());
return roadClass.getColorAttrName();
}
}
@Override
public String getColorName(String attribute) {
RoadClass roadClass = RoadClass.valueOf(attribute.toUpperCase());
return roadClass.getColorName();
}
}
private static class RouteSteepnessStatisticComputer extends RouteStatisticComputer<Boundaries> {
@ -193,7 +220,7 @@ public class RouteStatistics {
private final List<Incline> inclines;
public RouteSteepnessStatisticComputer(List<Incline> inclines) {
super(null);
super(null, StatisticType.STEEPNESS);
this.inclines = inclines;
}
@ -209,8 +236,9 @@ public class RouteStatistics {
index++;
}
if (index >= routeInclines.size()) {
String colorAttrName = determineColor(current);
RouteSegmentAttribute<Boundaries> attribute = new RouteSegmentAttribute<>(index, current, colorAttrName);
String colorAttrName = getColorAttrName(current);
String colorName = getColorName(current);
RouteSegmentAttribute<Boundaries> attribute = new RouteSegmentAttribute<>(index, current, colorAttrName, colorName);
if (prevIncline != null) {
attribute.setInitDistance(prevIncline.getDistance());
}
@ -233,25 +261,38 @@ public class RouteStatistics {
}
@Override
public String determineColor(Boundaries attribute) {
public String getColorAttrName(Boundaries attribute) {
return attribute.getLowerBoundary() >= 0 ? POSITIVE_INCLINE_COLOR_ATTR_NAME : NEGATIVE_INCLINE_COLOR_ATTR_NAME;
}
}
@Override
public String getColorName(Boundaries attribute) {
return null;
}
}
public static class RouteSegmentAttribute<E> {
private final int index;
private final E attribute;
private final String colorAttrName;
private final String colorName;
private float distance;
private float initDistance;
public RouteSegmentAttribute(int index, E attribute, String colorAttrName) {
public RouteSegmentAttribute(int index, E attribute, String colorAttrName, String colorName) {
this.index = index;
this.attribute = attribute;
this.colorAttrName = colorAttrName;
this.colorName = colorName;
}
public RouteSegmentAttribute(RouteSegmentAttribute<E> segmentAttribute) {
this.index = segmentAttribute.getIndex();
this.attribute = segmentAttribute.getAttribute();
this.colorAttrName = segmentAttribute.getColorAttrName();
this.colorName = segmentAttribute.getColorName();
}
public int getIndex() {
@ -282,6 +323,10 @@ public class RouteStatistics {
return colorAttrName;
}
public String getColorName() {
return colorName;
}
@Override
public String toString() {
return "RouteSegmentAttribute{" +
@ -407,13 +452,15 @@ public class RouteStatistics {
private final List<RouteSegmentAttribute<E>> elements;
private final Map<E, RouteSegmentAttribute<E>> partition;
private final float totalDistance;
private final StatisticType type;
private Statistics(List<RouteSegmentAttribute<E>> elements,
Map<E, RouteSegmentAttribute<E>> partition,
float totalDistance) {
float totalDistance, StatisticType type) {
this.elements = elements;
this.partition = partition;
this.totalDistance = totalDistance;
this.type = type;
}
public float getTotalDistance() {
@ -427,26 +474,32 @@ public class RouteStatistics {
public Map<E, RouteSegmentAttribute<E>> getPartition() {
return partition;
}
public StatisticType getStatisticType() {
return type;
}
}
public enum RoadClass {
UNDEFINED("whitewaterSectionGrade0Color", "undefined"),
MOTORWAY("motorwayRoadColor", "motorway", "motorway_link"),
STATE_ROAD("trunkRoadColor" , "trunk", "trunk_link", "primary", "primary_link"),
ROAD("secondaryRoadColor", "secondary", "secondary_link", "tertiary", "tertiary_link", "unclassified"),
STREET("residentialRoadColor" ,"residential", "living_street"),
SERVICE("serviceRoadColor", "service"),
TRACK("trackColor", "track", "road"),
FOOTWAY("footwayColor", "footway"),
PATH("pathColor", "path"),
CYCLE_WAY("cyclewayColor", "cycleway");
MOTORWAY(null, "#ffa200", "motorway", "motorway_link"),
STATE_ROAD(null, "#ffae1d", "trunk", "trunk_link", "primary", "primary_link"),
ROAD(null, "#ffb939", "secondary", "secondary_link", "tertiary", "tertiary_link", "unclassified"),
STREET(null, "#ffc554", "residential", "living_street"),
SERVICE(null, "#ffd070", "service"),
TRACK(null, "#ffdb8a", "track", "road"),
FOOTWAY(null, "#ffe7a7", "footway"),
CYCLE_WAY(null, "#fff4c6", "cycleway"),
PATH(null, "#fffadd", "path"),
UNDEFINED(null, "#DCDBDD", "undefined");
final Set<String> roadClasses = new TreeSet<>();
final String colorAttrName;
final String colorName;
RoadClass(String colorAttrName, String... classes) {
RoadClass(String colorAttrName, String colorName, String... classes) {
roadClasses.addAll(Arrays.asList(classes));
this.colorAttrName = colorAttrName;
this.colorName = colorName;
}
boolean contains(String roadClass) {
@ -456,39 +509,45 @@ public class RouteStatistics {
String getColorAttrName() {
return colorAttrName;
}
public String getColorName() {
return this.colorName;
}
}
public enum RoadSurface {
UNDEFINED("whitewaterSectionGrade0Color", "undefined"),
PAVED("motorwayRoadColor", "paved"),
UNPAVED("motorwayRoadShadowColor", "unpaved"),
ASPHALT("trunkRoadColor", "asphalt"),
CONCRETE("primaryRoadColor", "concrete"),
COMPACTED("secondaryRoadColor", "compacted"),
GRAVEL("tertiaryRoadColor", "gravel"),
FINE_GRAVEL("residentialRoadColor", "fine_gravel"),
PAVING_STONES("serviceRoadColor", "paving_stones"),
SETT("roadRoadColor", "sett"),
COBBLESTONE("pedestrianRoadColor", "cobblestone"),
PEBBLESTONE("racewayColor", "pebblestone"),
STONE("trackColor", "stone"),
METAL("footwayColor", "metal"),
GROUND("pathColor", "ground", "mud"),
WOOD("cycleRouteColor", "wood"),
GRASS_PAVER("osmcBlackColor", "grass_paver"),
GRASS("osmcBlueColor", "grass"),
SAND("osmcGreenColor", "sand"),
SALT("osmcRedColor", "salt"),
SNOW("osmcYellowColor", "snow"),
ICE("osmcOrangeColor", "ice"),
CLAY("osmcBrownColor", "clay");
UNDEFINED(null, "#e8e8e8", "undefined"),
PAVED(null, "#a7cdf8", "paved"),
UNPAVED(null, "#cc9900", "unpaved"),
ASPHALT(null, "#6f687e", "asphalt"),
CONCRETE(null, "#a7cdf8", "concrete"),
COMPACTED(null, "#cbcbe8", "compacted"),
GRAVEL(null, "#cbcbe8", "gravel"),
FINE_GRAVEL(null, "#cbcbe8", "fine_gravel"),
PAVING_STONES(null, "#a7cdf8", "paving_stones"),
SETT(null, "#a7cdf8", "sett"),
COBBLESTONE(null, "#a7cdf8", "cobblestone"),
PEBBLESTONE("#a7cdf8", "pebblestone"),
STONE(null, "#a7cdf8", "stone"),
METAL(null, "#a7cdf8", "metal"),
GROUND(null, "#cc9900", "ground", "mud"),
WOOD(null, "#a7cdf8", "wood"),
GRASS_PAVER(null, "#a7bef8", "grass_paver"),
GRASS(null, "#1fbe1f", "grass"),
SAND(null, "#ffd700", "sand"),
SALT(null, "#7eded8", "salt"),
SNOW(null, "#9feeef", "snow"),
ICE(null, "#9feeef", "ice"),
CLAY(null, "#cc9900", "clay");
final Set<String> surfaces = new TreeSet<>();
final String colorAttrName;
final String colorName;
RoadSurface(String colorAttrName, String... surfaces) {
RoadSurface(String colorAttrName, String colorName, String... surfaces) {
this.surfaces.addAll(Arrays.asList(surfaces));
this.colorAttrName = colorAttrName;
this.colorName = colorName;
}
boolean contains(String surface) {
@ -498,25 +557,31 @@ public class RouteStatistics {
public String getColorAttrName() {
return this.colorAttrName;
}
public String getColorName() {
return this.colorName;
}
}
public enum RoadSmoothness {
UNDEFINED("redColor", "undefined"),
EXCELLENT("orangeColor", "excellent"),
GOOD("brownColor", "good"),
INTERMEDIATE("darkyellowColor", "intermediate"),
BAD("yellowColor", "bad"),
VERY_BAD("lightgreenColor", "very_bad"),
HORRIBLE("greenColor", "horrible"),
VERY_HORRIBLE("lightblueColor", "very_horrible"),
IMPASSABLE("blueColor", "impassable");
UNDEFINED("redColor", null, "undefined"),
EXCELLENT("orangeColor", null, "excellent"),
GOOD("brownColor", null, "good"),
INTERMEDIATE("darkyellowColor", null, "intermediate"),
BAD("yellowColor", null, "bad"),
VERY_BAD("lightgreenColor", null, "very_bad"),
HORRIBLE("greenColor", null, "horrible"),
VERY_HORRIBLE("lightblueColor", null, "very_horrible"),
IMPASSABLE("blueColor", null, "impassable");
final Set<String> surfaces = new TreeSet<>();
final String colorAttrName;
final String colorName;
RoadSmoothness(String colorAttrName, String... surfaces) {
RoadSmoothness(String colorAttrName, String colorName, String... surfaces) {
this.surfaces.addAll(Arrays.asList(surfaces));
this.colorAttrName = colorAttrName;
this.colorName = colorName;
}
boolean contains(String surface) {
@ -526,5 +591,16 @@ public class RouteStatistics {
public String getColorAttrName() {
return this.colorAttrName;
}
public String getColorName() {
return this.colorName;
}
}
public enum StatisticType {
CLASS,
SURFACE,
SMOOTHNESS,
STEEPNESS
}
}

View file

@ -301,6 +301,10 @@ public class TransportRoutePlanner {
return route.getForwardStops().get(end);
}
public List<TransportStop> getTravelStops() {
return route.getForwardStops().subList(start, end);
}
public List<Node> getNodes() {
List<Node> nodes = new ArrayList<>();
List<Way> ways = getGeometry();

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/card_and_list_background_light" />
<stroke
android:width="1dp"
android:color="#B3000000" />
</shape>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="2dp" />
<solid android:color="@color/card_and_list_background_light" />
<stroke
android:width="1dp"
android:color="#B3000000" />
</shape>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/ctx_menu_bottom_view_url_color_light" />
<corners android:radius="8dp" />
<stroke android:width="1dp" android:color="#154a99" />
<size android:width="10dp" android:height="14dp" />
</shape>
</item>
</selector>

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/content_padding">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/info_type_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:letterSpacing="@dimen/text_button_letter_spacing"
android:maxLines="1"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:textSize="@dimen/text_button_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:ignore="UnusedAttribute"
tools:text="@string/route_class_stat_container" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/info_type_details"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="center"
android:letterSpacing="@dimen/text_button_letter_spacing"
android:maxLines="1"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:text="@string/rendering_category_details"
android:textSize="@dimen/text_button_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:ignore="UnusedAttribute" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="60dp" />
<LinearLayout
android:id="@+id/route_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/route_info_legend_padding"
android:paddingBottom="@dimen/route_info_legend_padding" />
</LinearLayout>
</LinearLayout>

View file

@ -2,36 +2,133 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?attr/bg_color"
android:paddingTop="8dp">
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp">
<ImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_route_distance" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_gravity="center_vertical"/>
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?attr/routeParameterTitleColor"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="26 km" />
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/total_distance"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp">
<ImageView
android:id="@+id/time_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_time_span" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:textColor="?attr/routeParameterTitleColor"
android:textSize="@dimen/default_list_text_size"
osmand:typeface="@string/font_roboto_medium"
tools:text="20 min" />
<TextView
android:id="@+id/time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:orientation="vertical">
<com.github.mikephil.charting.charts.LineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/bg_color"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingBottom="4dp">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp">
@ -40,23 +137,23 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_altitude_average"/>
android:src="@drawable/ic_action_altitude_average" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/average_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="40 m"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
tools:text="40 m" />
<TextView
android:id="@+id/average_desc"
@ -65,7 +162,7 @@
android:background="@null"
android:text="@string/average_altitude"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
@ -83,23 +180,23 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_altitude_average"/>
android:src="@drawable/ic_action_altitude_average" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/range_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="30m - 53m"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
tools:text="30m - 53m" />
<TextView
android:id="@+id/range_desc"
@ -108,7 +205,7 @@
android:background="@null"
android:text="@string/altitude_range"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
@ -119,15 +216,16 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="8dp">
@ -135,7 +233,7 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
android:background="?attr/dashboard_divider" />
</LinearLayout>
@ -150,7 +248,7 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
android:background="?attr/dashboard_divider" />
</LinearLayout>
@ -159,15 +257,16 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:baselineAligned="false"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp">
@ -176,23 +275,23 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_altitude_ascent"/>
android:src="@drawable/ic_action_altitude_ascent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/ascent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="174"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
tools:text="174" />
<TextView
android:id="@+id/ascent_desc"
@ -201,7 +300,7 @@
android:background="@null"
android:text="@string/altitude_ascent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
@ -219,23 +318,23 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_altitude_descent"/>
android:src="@drawable/ic_action_altitude_descent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
android:layout_marginLeft="18dp"
android:orientation="vertical">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/descent_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
tools:text="164"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/default_desc_text_size"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_desc_text_size"/>
tools:text="164" />
<TextView
android:id="@+id/descent_desc"
@ -244,7 +343,7 @@
android:background="@null"
android:text="@string/altitude_descent"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
@ -252,223 +351,4 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="4dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/route_class_stat_container"
android:gravity="center"
android:layout_gravity="center_horizontal"
/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/route_class_stat_chart"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/route_class_stat_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/route_surface_stat_container"
android:gravity="center"
android:layout_gravity="center_horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/route_surface_stat_chart"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/route_surface_stat_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/route_smoothness_stat_container"
android:gravity="center"
android:layout_gravity="center_horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/route_smoothness_stat_chart"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/route_smoothness_stat_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/route_steepness_stat_container"
android:gravity="center"
android:layout_gravity="center_horizontal"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/route_steepness_stat_chart"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:id="@+id/route_steepness_stat_items"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<LinearLayout
android:id="@+id/details_view"
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:background="?attr/selectableItemBackground"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/details_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right|center_vertical"
android:textColor="?attr/color_dialog_buttons"
android:textSize="@dimen/default_sub_text_size"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"
android:text="@string/analyze_on_map"/>
</LinearLayout>
</LinearLayout>
<include layout="@layout/list_item_divider"/>
</LinearLayout>

View file

@ -1,12 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_transparent">
<net.osmand.plus.mapcontextmenu.InterceptorLinearLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:osmand="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/tools"
android:orientation="vertical">
<FrameLayout
android:id="@+id/bottom_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foregroundGravity="top|fill_horizontal">
<net.osmand.plus.LockableScrollView
android:id="@+id/route_menu_bottom_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/route_menu_cards_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="60dp">
</LinearLayout>
</net.osmand.plus.LockableScrollView>
</FrameLayout>
</net.osmand.plus.mapcontextmenu.InterceptorLinearLayout>
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -16,9 +49,7 @@
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="@dimen/dashboard_map_toolbar"
android:theme="?attr/toolbar_theme"
app:contentInsetLeft="54dp"
app:contentInsetStart="54dp">
android:theme="?attr/toolbar_theme">
<LinearLayout
android:layout_width="match_parent"
@ -33,8 +64,8 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="14dp"
android:layout_marginTop="14dp"
android:layout_marginBottom="14dp"
android:layout_weight="1"
android:orientation="vertical">
@ -47,10 +78,9 @@
android:lines="1"
android:maxLines="1"
android:singleLine="true"
android:text="@string/show_route"
android:textColor="?attr/searchbar_text"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_list_text_size_large"/>
android:textSize="@dimen/default_list_text_size_large"
osmand:typeface="@string/font_roboto_medium" />
</LinearLayout>
@ -61,7 +91,7 @@
android:layout_height="48dp"
android:layout_marginTop="4dp"
android:contentDescription="@string/print_route"
android:src="@drawable/ic_action_gprint_dark"/>
android:src="@drawable/ic_action_gprint_dark" />
<ImageButton
android:id="@+id/save_as_gpx"
@ -70,7 +100,7 @@
android:layout_height="48dp"
android:layout_marginTop="4dp"
android:contentDescription="@string/shared_string_save_as_gpx"
android:src="@drawable/ic_action_gsave_dark"/>
android:src="@drawable/ic_action_gsave_dark" />
<ImageButton
android:id="@+id/share_as_gpx"
@ -79,7 +109,7 @@
android:layout_height="48dp"
android:layout_marginTop="4dp"
android:contentDescription="@string/share_route_as_gpx"
android:src="@drawable/ic_action_gshare_dark"/>
android:src="@drawable/ic_action_gshare_dark" />
</LinearLayout>
@ -87,151 +117,50 @@
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="?attr/bg_color"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp">
<ImageView
android:id="@+id/distance_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_route_distance"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/distance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="26 km"
android:textColor="?attr/routeParameterTitleColor"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_list_text_size"/>
<TextView
android:id="@+id/distance_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/total_distance"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
android:paddingLeft="16dp">
<ImageView
android:id="@+id/time_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_action_time_span"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="18dp">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="20 min"
android:textColor="?attr/routeParameterTitleColor"
osmand:typeface="@string/font_roboto_medium"
android:textSize="@dimen/default_list_text_size"/>
<TextView
android:id="@+id/time_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:text="@string/shared_string_time"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/default_sub_text_size"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:background="@color/map_widget_blue">
<LinearLayout
android:id="@+id/go_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:background="?android:attr/selectableItemBackground"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_start_navigation"/>
<net.osmand.plus.widgets.TextViewEx
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="@string/shared_string_go"
osmand:typeface="@string/font_roboto_medium"
osmand:textAllCapsCompat="true"
android:textColor="@color/color_white"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
</LinearLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout android:id="@+id/listContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/map_hud_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_marginLeft="@dimen/fab_margin_right"
android:layout_marginRight="@dimen/fab_margin_right">
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="true"
android:divider="@null"
android:dividerHeight="0dp"/>
<TextView android:id="@+id/internalEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</FrameLayout>
<ImageButton
android:id="@+id/map_my_location_button"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:layout_gravity="bottom"
android:background="@drawable/btn_circle"
android:contentDescription="@string/shared_string_my_location"
tools:src="@drawable/ic_action_test_light" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/map_button_spacing"
android:orientation="vertical">
<ImageButton
android:id="@+id/map_zoom_in_button"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:background="@drawable/btn_circle"
android:contentDescription="@string/zoomIn"
tools:src="@drawable/ic_action_test_light" />
<ImageButton
android:id="@+id/map_zoom_out_button"
android:layout_width="@dimen/map_button_size"
android:layout_height="@dimen/map_button_size"
android:layout_marginTop="@dimen/map_button_spacing"
android:background="@drawable/btn_circle"
android:contentDescription="@string/zoomOut"
tools:src="@drawable/ic_action_test_light" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/route_info_stat_item">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:src="@drawable/ic_action_circle"
android:id="@+id/route_stat_item_image"
android:paddingLeft="16dp"/>
<TextView
android:id="@+id/route_stat_item_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"/>
</LinearLayout>
</LinearLayout>

View file

@ -2736,11 +2736,10 @@
<string name="add_destination_point">إضافة وجهة</string>
<string name="add_intermediate_point">أضف وجهة وسيطة</string>
<string name="add_start_point">إضافة نقطة البدء</string>
<string name="intermediate_waypoint">النقطة المتوسط : %1$s</string>
<string name="waypoints">نقاط الطريق: %1$s</string>
<string name="transfers">النقل:%1$s</string>
<string name="on_foot">سيرا على الأقدام: %1$s</string>
<string name="route_way">الطريقة: %1$s</string>
<string name="intermediate_waypoint">النقطة المتوسط</string>
<string name="transfers">النقل</string>
<string name="on_foot">سيرا على الأقدام</string>
<string name="route_way">الطريقة</string>
<string name="points_of_interests">نقطة اهتمام (POI)</string>
<string name="waiting_for_route_calculation">في انتظار لحساب المسار</string>
<string name="app_mode_public_transport">النقل العام</string>
@ -2749,7 +2748,7 @@
<string name="simulate_navigation">محاكاة الملاحة</string>
<string name="choose_track_file_to_follow">اختر مسار للمتابعة</string>
<string name="voice_announcements">إعلان صوتي</string>
<string name="intermediate_destinations">الوجهات المتوسطة : %1$s</string>
<string name="intermediate_destinations">الوجهات المتوسطة</string>
<string name="arrive_at_time">الوصول إلى %1$s</string>
<string name="send_search_query_description">سوف نقوم بإرسال استعلام البحث الخاص بك: <b>\"%1$s\"</b>، وكذالك الموقع الخاص بك. <br/>
<br/> نحن لا نجمع معلومات شخصية، ونحن فقط بحاجة إلى البحث عن البيانات لتحسين خوارزمية البحث. <br/>

View file

@ -1599,7 +1599,7 @@
<string name="osm_recipients_label">Beneficiarios d\'OSM</string>
<string name="points_of_interests">Puntos d\'interés (PdI)</string>
<string name="waiting_for_route_calculation">Esperando pol cálculu de la ruta</string>
<string name="intermediate_destinations">Destinos intermedios: %1$s</string>
<string name="intermediate_destinations">Destinos intermedios</string>
<string name="map_import_error">Fallu na importación del mapa</string>
<string name="simulate_your_location">Simular la to posición</string>
<string name="shared_string_disable">Desactivar</string>
@ -1615,7 +1615,7 @@
<string name="shared_string_height">Altor</string>
<string name="swap_start_and_destination">Intercambiar l\'aniciu y destín</string>
<string name="add_start_point">Amiestu d\'un puntu d\'aniciu</string>
<string name="intermediate_waypoint">Puntu intermediu: %1$s</string>
<string name="intermediate_waypoint">Puntu intermediu</string>
<string name="get_osmand_live">Consigui OsmAnd pa desbloquiar toles caratuerístiques: Anovamientos diarios del mapa con descargues ensin llende, tolos plugins de pagu y de baldre, Wikipedia, Wikivoyage y muncho más.</string>
<string name="maps_you_need_descr">Según los artículos qu\'amestesti a marcadores, aconséyase que baxes los mapes de darréu:</string>
<string name="popular_destinations">Destinos sonaos</string>
@ -1688,7 +1688,6 @@
<string name="trace_rendering_descr">Amuesa\'l rindimientu del renderizáu.</string>
<string name="planning_trip_item">Planificación d\'un viaxe</string>
<string name="search_on_the_map_item">Guetes nel mapa</string>
<string name="waypoints">Puntos: %1$s</string>
<string name="download_file">Descarga d\'un ficheru</string>
<string name="waypoints_removed_from_map_markers">Desaniciáronse los puntos de los marcadores del mapa</string>
<string name="quick_action_resume_pause_navigation">Posar/siguir cola navegación</string>

View file

@ -3182,11 +3182,10 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB).
<string name="add_destination_point">Dadać punkt pryznačennia</string>
<string name="add_intermediate_point">Dadać pramiežkavy punkt</string>
<string name="add_start_point">Dadać pačatkovy punkt</string>
<string name="intermediate_waypoint">Pramiežkavy punkt: %1$s</string>
<string name="waypoints">Punkty šliachu: %1$s</string>
<string name="transfers">transfiery: %1$s</string>
<string name="on_foot">pieššu: %1$s</string>
<string name="route_way">Šliach: %1$s</string>
<string name="intermediate_waypoint">Pramiežkavy punkt</string>
<string name="transfers">transfiery</string>
<string name="on_foot">pieššu</string>
<string name="route_way">Šliach</string>
<string name="points_of_interests">Punkty cikavasciaŭ (POI)</string>
<string name="waiting_for_route_calculation">Čakannie padliku maršrutu</string>
<string name="app_mode_public_transport">Hramadski transpart</string>
@ -3195,7 +3194,7 @@ Praparcyjnaj pamiacі %4$s MB (Abmiežavańnie Android %5$s MB, Dalvik %6$s MB).
<string name="simulate_navigation">Simuliavać navihacyju</string>
<string name="choose_track_file_to_follow">Abiarycie fajl sliedu</string>
<string name="voice_announcements">Halasavyja apaviaščenni</string>
<string name="intermediate_destinations">Pramiežkavyja punkty: %1$s</string>
<string name="intermediate_destinations">Pramiežkavyja punkty</string>
<string name="arrive_at_time">Prybyccio a %1$s</string>
<string name="quick_action_switch_day_night_descr">Naciskannie na knopku dziejannia pierakliučaje načny i dzionny režymy OsmAnd</string>
<string name="quick_action_switch_day_mode">Dzionny režym</string>

View file

@ -2894,11 +2894,10 @@
<string name="add_destination_point">Дадаць пункт прызначэння</string>
<string name="add_intermediate_point">Дадаць прамежкавы пункт</string>
<string name="add_start_point">Дадаць пачатковы пункт</string>
<string name="intermediate_waypoint">Прамежкавы пункт: %1$s</string>
<string name="waypoints">Пункты шляху: %1$s</string>
<string name="transfers">трансферы: %1$s</string>
<string name="on_foot">пешшу: %1$s</string>
<string name="route_way">Шлях: %1$s</string>
<string name="intermediate_waypoint">Прамежкавы пункт</string>
<string name="transfers">трансферы</string>
<string name="on_foot">пешшу</string>
<string name="route_way">Шлях</string>
<string name="points_of_interests">Пункты цікавасцяў (POI)</string>
<string name="waiting_for_route_calculation">Чаканне падліку маршруту</string>
<string name="app_mode_public_transport">Грамадскі транспарт</string>
@ -2907,7 +2906,7 @@
<string name="simulate_navigation">Сімуляваць навігацыю</string>
<string name="choose_track_file_to_follow">Абярыце файл следу</string>
<string name="voice_announcements">Галасавыя апавяшчэнні</string>
<string name="intermediate_destinations">Прамежкавыя пункты: %1$s</string>
<string name="intermediate_destinations">Прамежкавыя пункты</string>
<string name="arrive_at_time">Прыбыццё а %1$s</string>
<string name="quick_action_switch_day_night_descr">Націсканне на кнопку дзеяння пераключае начны і дзённы рэжымы OsmAnd</string>
<string name="quick_action_switch_day_mode">Дзённы рэжым</string>

View file

@ -2901,11 +2901,10 @@ Abasta l\'àrea: %1$s x %2$s</string>
<string name="add_destination_point">Afegeix destinació</string>
<string name="add_intermediate_point">Afegeix punt intermedi</string>
<string name="add_start_point">Afegeix punt d\'Inici</string>
<string name="intermediate_waypoint">Punt intermedi: %1$s</string>
<string name="waypoints">Fites: %1$s</string>
<string name="transfers">transferències: %1$s</string>
<string name="on_foot">a peu: %1$s</string>
<string name="route_way">Via: %1$s</string>
<string name="intermediate_waypoint">Punt intermedi</string>
<string name="transfers">transferències</string>
<string name="on_foot">a peu</string>
<string name="route_way">Via</string>
<string name="points_of_interests">Punts d\'interès(PDI)</string>
<string name="waiting_for_route_calculation">Esperant el càlcul de la ruta</string>
<string name="app_mode_public_transport">Transport públic</string>
@ -2914,7 +2913,7 @@ Abasta l\'àrea: %1$s x %2$s</string>
<string name="simulate_navigation">Simula la navegació</string>
<string name="choose_track_file_to_follow">Seleccioneu l\'arxiu de la traça a seguir</string>
<string name="voice_announcements">Anuncis de veu</string>
<string name="intermediate_destinations">Destinacions intermèdies: %1$s</string>
<string name="intermediate_destinations">Destinacions intermèdies</string>
<string name="arrive_at_time">Arribada a %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">t</string>

View file

@ -2860,11 +2860,10 @@ Zobrazená oblast: %1$s x %2$s</string>
<string name="add_destination_point">Přidat cíl</string>
<string name="add_intermediate_point">Přidat mezicíl</string>
<string name="add_start_point">Přidat startovní bod</string>
<string name="intermediate_waypoint">Mezicíl: %1$s</string>
<string name="waypoints">Body na cestě: %1$s</string>
<string name="transfers">přestupy: %1$s</string>
<string name="on_foot">pěšky: %1$s</string>
<string name="route_way">Cesta: %1$s</string>
<string name="intermediate_waypoint">Mezicíl</string>
<string name="transfers">přestupy</string>
<string name="on_foot">pěšky</string>
<string name="route_way">Cesta</string>
<string name="points_of_interests">Body zájmu (POI)</string>
<string name="waiting_for_route_calculation">Čekám na výpočet trasy</string>
<string name="app_mode_public_transport">Veřejná doprava</string>
@ -2873,7 +2872,7 @@ Zobrazená oblast: %1$s x %2$s</string>
<string name="simulate_navigation">Simulovat navigaci</string>
<string name="choose_track_file_to_follow">Vyberte soubor s trasou, kterou chcete následovat</string>
<string name="voice_announcements">Hlasová oznámení</string>
<string name="intermediate_destinations">Mezicíle: %1$s</string>
<string name="intermediate_destinations">Mezicíle</string>
<string name="arrive_at_time">Příjezd v %1$s</string>
<string name="add_destination_query">Nejdříve prosím zadejte cíl</string>
<string name="previous_route">Předchozí trasa</string>

View file

@ -2891,17 +2891,16 @@ Repræsenterer område: %1$s x %2$s</string>
<string name="add_destination_point">Tilføj destination</string>
<string name="add_intermediate_point">Tilføj mellemliggende</string>
<string name="add_start_point">Tilføj startpunkt</string>
<string name="intermediate_waypoint">Mellemliggende punkt: %1$s</string>
<string name="waypoints">Rutepunkter: %1$s</string>
<string name="transfers">overførsler: %1$s</string>
<string name="on_foot">til fods: %1$s</string>
<string name="intermediate_waypoint">Mellemliggende punkt</string>
<string name="transfers">overførsler</string>
<string name="on_foot">til fods</string>
<string name="points_of_interests">Interessepunkter (IP)</string>
<string name="waiting_for_route_calculation">Venter på ruteberegningen</string>
<string name="app_mode_public_transport">Offentlig transport</string>
<string name="avoid_roads_descr">Vælg vejen på kortet eller fra nedenstående liste, der skal undgås under navigation:</string>
<string name="show_along_the_route">Vis langs ruten</string>
<string name="simulate_navigation">Simulere navigation</string>
<string name="intermediate_destinations">Mellemliggende destinationer: %1$s</string>
<string name="intermediate_destinations">Mellemliggende destinationer</string>
<string name="quick_action_switch_day_mode">Dag tilstand</string>
<string name="quick_action_switch_night_mode">Nat tilstand</string>
<string name="quick_action_day_night_switch_mode">Skift dag/nat tilstand</string>
@ -2910,7 +2909,7 @@ Repræsenterer område: %1$s x %2$s</string>
<string name="shared_string_capacity">Kapacitet</string>
<string name="shared_string_width">Bredde</string>
<string name="shared_string_height">Højde</string>
<string name="route_way">Vej: %1$s</string>
<string name="route_way">Vej</string>
<string name="choose_track_file_to_follow">Vælg sporfil til at følge</string>
<string name="swap_start_and_destination">Skift start og destination</string>
<string name="voice_announcements">Stemmemeddelelser</string>

View file

@ -2898,11 +2898,10 @@ Abgedeckte Fläche: %1$s x %2$s</string>
<string name="add_destination_point">Ziel hinzufügen</string>
<string name="add_intermediate_point">Zwischenpunkt hinzufügen</string>
<string name="add_start_point">Startpunkt hinzufügen</string>
<string name="intermediate_waypoint">Zwischenpunkt: %1$s</string>
<string name="waypoints">Wegpunkte: %1$s</string>
<string name="transfers">Umstiege: %1$s</string>
<string name="on_foot">Zu Fuß: %1$s</string>
<string name="route_way">Weg: %1$s</string>
<string name="intermediate_waypoint">Zwischenpunkt</string>
<string name="transfers">Umstiege</string>
<string name="on_foot">Zu Fuß</string>
<string name="route_way">Weg</string>
<string name="points_of_interests">Orte von Interesse(OVI)</string>
<string name="waiting_for_route_calculation">Warten auf Routenberechung</string>
<string name="app_mode_public_transport">Öffentlicher Verkehr</string>
@ -2911,7 +2910,7 @@ Abgedeckte Fläche: %1$s x %2$s</string>
<string name="simulate_navigation">Navigation simulieren</string>
<string name="choose_track_file_to_follow">Wähle Track-Datei zum Verfolgen aus</string>
<string name="voice_announcements">Sprachmeldungen</string>
<string name="intermediate_destinations">Zwischenziele: %1$s</string>
<string name="intermediate_destinations">Zwischenziele</string>
<string name="arrive_at_time">Ankunftszeit um %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">t</string>

View file

@ -2875,11 +2875,10 @@ Indikas lokon: %1$s x %2$s"</string>
<string name="add_destination_point">Aldoni celon</string>
<string name="add_intermediate_point">Aldoni intercelon</string>
<string name="add_start_point">Aldoni komencpunkton</string>
<string name="intermediate_waypoint">Intercelo: %1$s</string>
<string name="waypoints">Navigadpunktoj: %1$s</string>
<string name="transfers">transveturiliĝoj: %1$s</string>
<string name="on_foot">piede: %1$s</string>
<string name="route_way">Vojo: %1$s</string>
<string name="intermediate_waypoint">Intercelo</string>
<string name="transfers">transveturiliĝoj</string>
<string name="on_foot">piede</string>
<string name="route_way">Vojo</string>
<string name="points_of_interests">Interesejoj</string>
<string name="waiting_for_route_calculation">Atendu ĝis la kurso kalkuliĝos</string>
<string name="app_mode_public_transport">Transporto publika</string>
@ -2888,7 +2887,7 @@ Indikas lokon: %1$s x %2$s"</string>
<string name="simulate_navigation">Simuli navigadon</string>
<string name="choose_track_file_to_follow">Elektu dosieron de kurso por sekvi</string>
<string name="voice_announcements">Voĉaj anoncoj</string>
<string name="intermediate_destinations">Interceloj: %1$s</string>
<string name="intermediate_destinations">Interceloj</string>
<string name="arrive_at_time">Alveno je %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">Mg</string>

View file

@ -2892,11 +2892,10 @@ Lon %2$s</string>
<string name="add_destination_point">Añadir destino</string>
<string name="add_intermediate_point">Añadir punto intermedio</string>
<string name="add_start_point">Añadir punto de partida</string>
<string name="intermediate_waypoint">Punto intermedio: %1$s</string>
<string name="waypoints">Puntos de referencia: %1$s</string>
<string name="transfers">transferencias: %1$s</string>
<string name="on_foot">a pie: %1$s</string>
<string name="route_way">Ruta: %1$s</string>
<string name="intermediate_waypoint">Punto intermedio</string>
<string name="transfers">transferencias</string>
<string name="on_foot">a pie</string>
<string name="route_way">Ruta</string>
<string name="points_of_interests">Puntos de interés (PDI)</string>
<string name="waiting_for_route_calculation">Esperando el cálculo de la ruta</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2905,7 +2904,7 @@ Lon %2$s</string>
<string name="simulate_navigation">Simular navegación</string>
<string name="choose_track_file_to_follow">Elige el archivo de la traza a seguir</string>
<string name="voice_announcements">Anuncios de voz</string>
<string name="intermediate_destinations">Destinos intermedios: %1$s</string>
<string name="intermediate_destinations">Destinos intermedios</string>
<string name="arrive_at_time">Llegará a las %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">ton</string>

View file

@ -2893,11 +2893,10 @@ Lon %2$s</string>
<string name="add_destination_point">Añadir destino</string>
<string name="add_intermediate_point">Añadir punto intermedio</string>
<string name="add_start_point">Añadir punto de partida</string>
<string name="intermediate_waypoint">Punto intermedio: %1$s</string>
<string name="waypoints">Puntos de referencia: %1$s</string>
<string name="transfers">transferencias: %1$s</string>
<string name="on_foot">a pie: %1$s</string>
<string name="route_way">Ruta: %1$s</string>
<string name="intermediate_waypoint">Punto intermedio</string>
<string name="transfers">transferencias</string>
<string name="on_foot">a pie</string>
<string name="route_way">Ruta</string>
<string name="points_of_interests">Puntos de interés (PDI)</string>
<string name="waiting_for_route_calculation">Esperando el cálculo de la ruta</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2906,7 +2905,7 @@ Lon %2$s</string>
<string name="simulate_navigation">Simular navegación</string>
<string name="choose_track_file_to_follow">Elige el archivo de la traza a seguir</string>
<string name="voice_announcements">Anuncios de voz</string>
<string name="intermediate_destinations">Destinos intermedios: %1$s</string>
<string name="intermediate_destinations">Destinos intermedios</string>
<string name="arrive_at_time">Llegará a las %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">ton</string>

View file

@ -2894,11 +2894,10 @@
<string name="add_destination_point">Añadir destino</string>
<string name="add_intermediate_point">Añadir punto intermedio</string>
<string name="add_start_point">Añadir punto de partida</string>
<string name="intermediate_waypoint">Punto intermedio: %1$s</string>
<string name="waypoints">Puntos de referencia: %1$s</string>
<string name="transfers">transferencias: %1$s</string>
<string name="on_foot">a pie: %1$s</string>
<string name="route_way">Camino: %1$s</string>
<string name="intermediate_waypoint">Punto intermedio</string>
<string name="transfers">transferencias</string>
<string name="on_foot">a pie</string>
<string name="route_way">Camino</string>
<string name="points_of_interests">Puntos de interés (PDI)</string>
<string name="waiting_for_route_calculation">Esperando el cálculo de la ruta</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2907,7 +2906,7 @@
<string name="simulate_navigation">Simular navegación</string>
<string name="choose_track_file_to_follow">Elija el archivo de la traza a seguir</string>
<string name="voice_announcements">Anuncios de voz</string>
<string name="intermediate_destinations">Destinos intermedios: %1$s</string>
<string name="intermediate_destinations">Destinos intermedios</string>
<string name="arrive_at_time">Llegará a las %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">ton</string>

View file

@ -2889,16 +2889,15 @@ Area honi dagokio: %1$s x %2$s</string>
<string name="add_destination_point">Gehitu helburua</string>
<string name="add_intermediate_point">Gehitu tarteko puntua</string>
<string name="add_start_point">Gehitu abiapuntua</string>
<string name="intermediate_waypoint">Tarteko puntua: %1$s</string>
<string name="waypoints">Bide-puntuak: %1$s</string>
<string name="transfers">transferentziak: %1$s</string>
<string name="on_foot">oinez: %1$s</string>
<string name="route_way">Bidea: %1$s</string>
<string name="intermediate_waypoint">Tarteko puntua</string>
<string name="transfers">transferentziak</string>
<string name="on_foot">oinez</string>
<string name="route_way">Bidea</string>
<string name="points_of_interests">Puntu interesgarriak (POI)</string>
<string name="app_mode_public_transport">Garraio publikoa</string>
<string name="simulate_navigation">Simulatu nabigazioa</string>
<string name="voice_announcements">Ahots bidezko iragarpenak</string>
<string name="intermediate_destinations">Tarteko helburuak: %1$s</string>
<string name="intermediate_destinations">Tarteko helburuak</string>
<string name="arrive_at_time">Heltzeko ordua: %1$s</string>
<string name="lang_gn_py">Guaraniera</string>
<string name="quick_action_switch_day_mode">Eguneko modua</string>

View file

@ -2932,11 +2932,10 @@
<string name="add_destination_point">افزودن مقصد</string>
<string name="add_intermediate_point">افزودن نقطهٔ میانی</string>
<string name="add_start_point">افزودن نقطهٔ شروع</string>
<string name="intermediate_waypoint">نقطهٔ میانی: %1$s</string>
<string name="waypoints">نقاط بین‌راهی: %1$s</string>
<string name="transfers">انتقال‌ها: %1$s</string>
<string name="on_foot">روی پا: %1$s</string>
<string name="route_way">راه: %1$s</string>
<string name="intermediate_waypoint">نقطهٔ میانی</string>
<string name="transfers">انتقال‌ها</string>
<string name="on_foot">روی پا</string>
<string name="route_way">راه</string>
<string name="points_of_interests">نقاط پرکاربرد (POI)</string>
<string name="waiting_for_route_calculation">در انتظار محاسبهٔ مسیر</string>
<string name="app_mode_public_transport">حمل‌ونقل عمومی</string>
@ -2945,7 +2944,7 @@
<string name="simulate_navigation">شبیه‌سازی ناوبری</string>
<string name="choose_track_file_to_follow">فایل رد را برای دنبال‌کردن انتخاب کنید</string>
<string name="voice_announcements">پیام‌های گفتاری</string>
<string name="intermediate_destinations">مقصدهای میانی: %1$s</string>
<string name="intermediate_destinations">مقصدهای میانی</string>
<string name="arrive_at_time">زمان رسیدن: %1$s</string>
<string name="cubic_m">مترمکعب</string>
<string name="metric_ton">تن</string>

View file

@ -2867,11 +2867,10 @@ représentant la zone : %1$s x %2$s</string>
<string name="add_destination_point">Ajouter destination</string>
<string name="add_intermediate_point">Ajouter étape</string>
<string name="add_start_point">Ajouter départ</string>
<string name="intermediate_waypoint">Étape : %1$s</string>
<string name="waypoints">Points de passage : %1$s</string>
<string name="transfers">transferts : %1$s</string>
<string name="on_foot">à pied : %1$s</string>
<string name="route_way">Mode : %1$s</string>
<string name="intermediate_waypoint">Étape</string>
<string name="transfers">transferts</string>
<string name="on_foot">à pied</string>
<string name="route_way">Mode</string>
<string name="points_of_interests">Points d\'intérêt (PI)</string>
<string name="waiting_for_route_calculation">Calcul de l\'itinéraire en cours</string>
<string name="app_mode_public_transport">Transports publics</string>
@ -2880,7 +2879,7 @@ représentant la zone : %1$s x %2$s</string>
<string name="simulate_navigation">Simuler la navigation</string>
<string name="choose_track_file_to_follow">Sélectionner un fichier de trace à suivre</string>
<string name="voice_announcements">Annonces vocales</string>
<string name="intermediate_destinations">Destinations intermédiaires : %1$s</string>
<string name="intermediate_destinations">Destinations intermédiaires</string>
<string name="arrive_at_time">Arrivée à %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">t</string>

View file

@ -2955,11 +2955,10 @@ Lon %2$s</string>
<string name="add_destination_point">Engadir destino</string>
<string name="add_intermediate_point">Engadir punto intermedio</string>
<string name="add_start_point">Engadir punto inicial</string>
<string name="intermediate_waypoint">Punto intermedio: %1$s</string>
<string name="waypoints">Puntos de pasaxe: %1$s</string>
<string name="transfers">transferencias: %1$s</string>
<string name="on_foot">a pé: %1$s</string>
<string name="route_way">Vía: %1$s</string>
<string name="intermediate_waypoint">Punto intermedio</string>
<string name="transfers">transferencias</string>
<string name="on_foot">a pé</string>
<string name="route_way">Vía</string>
<string name="points_of_interests">Puntos de interese (PDI)</string>
<string name="waiting_for_route_calculation">Estase a agardar polo cálculo da rota</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2968,7 +2967,7 @@ Lon %2$s</string>
<string name="simulate_navigation">Simular navegación</string>
<string name="choose_track_file_to_follow">Escolle o ficheiro da pista a seguir</string>
<string name="voice_announcements">Anuncios de voz</string>
<string name="intermediate_destinations">Destinos intermedios: %1$s</string>
<string name="intermediate_destinations">Destinos intermedios</string>
<string name="arrive_at_time">Chegada ás %1$s</string>
<string name="lang_gn_py">Guaraní</string>
<string name="quick_action_switch_day_night_descr">Premendo neste botón de acción, troca entre o modo \"Noite\" e \"Día\" para o OsmAnd</string>

View file

@ -2878,11 +2878,10 @@
<string name="add_destination_point">הוספת יעד</string>
<string name="add_intermediate_point">הוספת נקודת ביניים</string>
<string name="add_start_point">הוספת נקודת התחלה</string>
<string name="intermediate_waypoint">נקודת ביניים: %1$s</string>
<string name="waypoints">נקודות דרך: %1$s</string>
<string name="transfers">החלפות: %1$s</string>
<string name="on_foot">ברגל: %1$s</string>
<string name="route_way">דרך: %1$s</string>
<string name="intermediate_waypoint">נקודת ביניים</string>
<string name="transfers">החלפות</string>
<string name="on_foot">ברגל</string>
<string name="route_way">דרך</string>
<string name="points_of_interests">נקודות עניין (נ״ע)</string>
<string name="waiting_for_route_calculation">בהמתנה לחישוב מסלול</string>
<string name="app_mode_public_transport">תחבורה ציבורית</string>
@ -2891,7 +2890,7 @@
<string name="simulate_navigation">הדמיית ניווט</string>
<string name="choose_track_file_to_follow">נא לבחור קובץ מסלול להצגה</string>
<string name="voice_announcements">הכרזות קוליות</string>
<string name="intermediate_destinations">יעדי ביניים: %1$s</string>
<string name="intermediate_destinations">יעדי ביניים</string>
<string name="arrive_at_time">הגעה ב־%1$s</string>
<string name="quick_action_switch_day_night_descr">נגיעה בכפתור פעולה זה תחליף בין מצבי יום ולילה עבור OsmAnd</string>
<string name="quick_action_switch_day_mode">מצב יום</string>

View file

@ -2786,11 +2786,10 @@ Kérlek adj meg egy teljes kódot</string>
<string name="add_destination_point">Célpont hozzáadása</string>
<string name="add_intermediate_point">Köztes célpont hozzáadása</string>
<string name="add_start_point">Kiindulópont hozzáadása</string>
<string name="intermediate_waypoint">"Köztes célpont: %1$s "</string>
<string name="waypoints">Útpontok: %1$s</string>
<string name="transfers">átszállások: %1$s</string>
<string name="on_foot">gyalog: %1$s</string>
<string name="route_way">Út: %1$s</string>
<string name="intermediate_waypoint">Köztes célpont</string>
<string name="transfers">átszállások</string>
<string name="on_foot">gyalog</string>
<string name="route_way">Út</string>
<string name="points_of_interests">Érdekes helyek (POI)</string>
<string name="waiting_for_route_calculation">Várakozás az útvonal kiszámítására</string>
<string name="app_mode_public_transport">Tömegközlekedés</string>
@ -2799,7 +2798,7 @@ Kérlek adj meg egy teljes kódot</string>
<string name="simulate_navigation">Navigáció szimulálása</string>
<string name="choose_track_file_to_follow">Válaszd ki a követendő nyomvonalfájlt</string>
<string name="voice_announcements">Hangbemondások</string>
<string name="intermediate_destinations">Köztes célpontok: %1$s</string>
<string name="intermediate_destinations">Köztes célpontok</string>
<string name="arrive_at_time">Érkezés ekkor: %1$s</string>
<string name="powered_by_osmand">A motorháztető alatt: OsmAnd</string>
<string name="third_party_application">Harmadik féltől származó alkalmazás</string>

View file

@ -2903,11 +2903,10 @@ Stendur fyrir svæði: %1$s x %2$s</string>
<string name="add_destination_point">Bæta við áfangastað</string>
<string name="add_intermediate_point">Bæta við milliáfanga</string>
<string name="add_start_point">Bæta við upphafspunkti</string>
<string name="intermediate_waypoint">Millipunktur: %1$s</string>
<string name="waypoints">Ferilpunktar: %1$s</string>
<string name="transfers">millifærslur: %1$s</string>
<string name="on_foot">gangandi: %1$s</string>
<string name="route_way">Leið: %1$s</string>
<string name="intermediate_waypoint">Millipunktur</string>
<string name="transfers">millifærslur</string>
<string name="on_foot">gangandi</string>
<string name="route_way">Leið</string>
<string name="points_of_interests">Merkisstaðir (POI)</string>
<string name="waiting_for_route_calculation">Bíð eftir útreikningi leiðar</string>
<string name="app_mode_public_transport">Almenningssamgöngur</string>
@ -2916,7 +2915,7 @@ Stendur fyrir svæði: %1$s x %2$s</string>
<string name="simulate_navigation">Herma eftir leiðsögn</string>
<string name="choose_track_file_to_follow">Veldu ferilskrá til að fylgja</string>
<string name="voice_announcements">Raddtilkynningar</string>
<string name="intermediate_destinations">Milliáfangar: %1$s</string>
<string name="intermediate_destinations">Milliáfangar</string>
<string name="arrive_at_time">Koma klukkan %1$s</string>
<string name="lang_gn_py">Guaraní</string>
<string name="quick_action_switch_day_night_descr">Ef ýtt er á þennan aðgerðahnapp verður skipt á milli Dags- og Næturhams í OsmAnd</string>

View file

@ -2875,11 +2875,10 @@ Rappresenta l\'area: %1$s x %2$s</string>
<string name="add_destination_point">Aggiungi destinazione</string>
<string name="add_intermediate_point">Aggiungi punto intermedio</string>
<string name="add_start_point">Aggiungi punto di partenza</string>
<string name="intermediate_waypoint">Punto intermedio: %1$s</string>
<string name="waypoints">Punto di passaggio: %1$s</string>
<string name="transfers">trasferimenti: %1$s</string>
<string name="on_foot">a piedi: %1$s</string>
<string name="route_way">Via: %1$s</string>
<string name="intermediate_waypoint">Punto intermedio</string>
<string name="transfers">trasferimenti</string>
<string name="on_foot">a piedi</string>
<string name="route_way">Via</string>
<string name="points_of_interests">Punti d\'interesse(PDI)</string>
<string name="waiting_for_route_calculation">In attesa del calcolo del percorso</string>
<string name="app_mode_public_transport">Trasporto pubblico</string>
@ -2888,7 +2887,7 @@ Rappresenta l\'area: %1$s x %2$s</string>
<string name="simulate_navigation">Simula la navigazione</string>
<string name="choose_track_file_to_follow">"Scegli il file della traccia da seguire "</string>
<string name="voice_announcements">Annunci vocali</string>
<string name="intermediate_destinations">Destinazioni intermedie: %1$s</string>
<string name="intermediate_destinations">Destinazioni intermedie</string>
<string name="arrive_at_time">Arrivo alle %1$s</string>
<string name="quick_action_switch_day_night_descr">Toccando questo bottone si cambierà fra la modalità Notte e Giorno per OsmAnd</string>
<string name="quick_action_switch_day_mode">Modalità Giorno</string>

View file

@ -185,6 +185,10 @@
<dimen name="route_info_icon_vertical_padding">9dp</dimen>
<dimen name="route_info_settings_buttons_height">48dp</dimen>
<dimen name="route_info_app_modes_padding">60dp</dimen>
<dimen name="route_info_card_row_min_height">90dp</dimen>
<dimen name="route_info_card_item_height">84dp</dimen>
<dimen name="route_info_list_text_padding">78dp</dimen>
<dimen name="route_info_legend_padding">12dp</dimen>
<dimen name="multi_selection_header_height">78dp</dimen>

View file

@ -2891,11 +2891,10 @@
<string name="add_destination_point">Legg til reisemål</string>
<string name="add_intermediate_point">Legg til mellomliggende</string>
<string name="add_start_point">Legg til startpunkt</string>
<string name="intermediate_waypoint">Mellomliggende punkt: %1$s</string>
<string name="waypoints">Rutepunkter: %1$s</string>
<string name="transfers">overføringer: %1$s</string>
<string name="on_foot">til fots: %1$s</string>
<string name="route_way">Vei: %1$s</string>
<string name="intermediate_waypoint">Mellomliggende punkt</string>
<string name="transfers">overføringer</string>
<string name="on_foot">til fots</string>
<string name="route_way">Vei</string>
<string name="points_of_interests">Interessepunkter (POI)</string>
<string name="waiting_for_route_calculation">Venter på ruteberegning</string>
<string name="avoid_roads_descr">Velg vei på kartet fra listen nedenfor som du ønsker å unngå under navigering:</string>
@ -2903,7 +2902,7 @@
<string name="simulate_navigation">Simuler navigering</string>
<string name="choose_track_file_to_follow">Velg sporfil å følge</string>
<string name="voice_announcements">Talemeldinger</string>
<string name="intermediate_destinations">Mellomstasjoner: %1$s</string>
<string name="intermediate_destinations">Mellomstasjoner</string>
<string name="arrive_at_time">Ankom klokken %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">t</string>

View file

@ -2897,11 +2897,10 @@ Reprezentuje obszar: %1$s x %2$s</string>
<string name="add_destination_point">Dodaj cel trasy</string>
<string name="add_intermediate_point">Dodaj punkt pośredni</string>
<string name="add_start_point">Dodaj punkt początkowy</string>
<string name="intermediate_waypoint">Punkt pośredni: %1$s</string>
<string name="waypoints">Punkty trasy: %1$s</string>
<string name="transfers">przesiadki: %1$s</string>
<string name="on_foot">pieszo: %1$s</string>
<string name="route_way">Trasa: %1$s</string>
<string name="intermediate_waypoint">Punkt pośredni</string>
<string name="transfers">przesiadki</string>
<string name="on_foot">pieszo</string>
<string name="route_way">Trasa</string>
<string name="points_of_interests">Użyteczne miejsca (UM)</string>
<string name="waiting_for_route_calculation">Oczekiwanie na wyznaczenie trasy</string>
<string name="app_mode_public_transport">Transport publiczny</string>
@ -2910,7 +2909,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
<string name="simulate_navigation">Symulacja nawigacji</string>
<string name="choose_track_file_to_follow">Wybierz plik trasy do śledzenia</string>
<string name="voice_announcements">Komunikaty głosowe</string>
<string name="intermediate_destinations">Pośrednie cele podróży: %1$s</string>
<string name="intermediate_destinations">Pośrednie cele podróży</string>
<string name="arrive_at_time">Dotrzesz do celu o %1$s</string>
<string name="quick_action_switch_day_night_descr">Naciśnięcie przycisku zmieni pomiędzy trybem Dziennym i Nocnym w OsmAndzie</string>
<string name="quick_action_switch_day_mode">Tryb Dzienny</string>

View file

@ -2829,11 +2829,10 @@ Pôr do Sol: %2$s</string>
<string name="add_destination_point">Adicionar destino</string>
<string name="add_intermediate_point">Adicionar intermediário</string>
<string name="add_start_point">Adicionar ponto inicial</string>
<string name="intermediate_waypoint">Ponto intermediário: %1$s</string>
<string name="waypoints">Ponto de trajeto: %1$s</string>
<string name="transfers">transferências: %1$s</string>
<string name="on_foot">a pé: %1$s</string>
<string name="route_way">Via: %1$s</string>
<string name="intermediate_waypoint">Ponto intermediário</string>
<string name="transfers">transferências</string>
<string name="on_foot">a pé</string>
<string name="route_way">Via</string>
<string name="points_of_interests">Ponto de interesse (PDI)</string>
<string name="waiting_for_route_calculation">Esperando por cálculo de rota</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2842,7 +2841,7 @@ Pôr do Sol: %2$s</string>
<string name="simulate_navigation">Simular navegação</string>
<string name="choose_track_file_to_follow">Escolha arquivo de trilha para seguir</string>
<string name="voice_announcements">Avisos por voz</string>
<string name="intermediate_destinations">Destinos intermediários: %1$s</string>
<string name="intermediate_destinations">Destinos intermediários</string>
<string name="arrive_at_time">Chegada em %1$s</string>
<string name="lang_gn_py">Guarani</string>
<string name="quick_action_switch_day_night_descr">Tocando neste botão de ação, alterne entre os modos Dia e Noite para OsmAnd</string>

View file

@ -2841,11 +2841,10 @@
<string name="add_destination_point">Adicionar destino</string>
<string name="add_intermediate_point">Adicionar intermediário</string>
<string name="add_start_point">Adicionar ponto de partida</string>
<string name="intermediate_waypoint">Ponto intermédio: %1$s</string>
<string name="waypoints">Pontos de passagem: %1$s</string>
<string name="transfers">transferências: %1$s</string>
<string name="on_foot">a pé: %1$s</string>
<string name="route_way">Caminho: %1$s</string>
<string name="intermediate_waypoint">Ponto intermédio</string>
<string name="transfers">transferências</string>
<string name="on_foot">a pé</string>
<string name="route_way">Caminho</string>
<string name="points_of_interests">Pontos de interesse (POI)</string>
<string name="waiting_for_route_calculation">Aguardando o cálculo da rota</string>
<string name="app_mode_public_transport">Transporte público</string>
@ -2854,6 +2853,6 @@
<string name="simulate_navigation">Simular navegação</string>
<string name="choose_track_file_to_follow">Escolha o ficheiro de caminho a seguir</string>
<string name="voice_announcements">Anúncios de voz</string>
<string name="intermediate_destinations">Destinos intermediários: %1$s</string>
<string name="intermediate_destinations">Destinos intermediários</string>
<string name="arrive_at_time">Chegar às %1$s</string>
</resources>

View file

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="intermediate_waypoint">Промежуточная точка: %1$s</string>
<string name="waypoints">Путевые точки: %1$s</string>
<string name="intermediate_destinations">Промежуточные точки: %1$s</string>
<string name="intermediate_waypoint">Промежуточная точка</string>
<string name="intermediate_destinations">Промежуточные точки</string>
<string name="arrive_at_time">Прибытие в %1$s</string>
<string name="av_locations_selected_desc">Файл GPX с координатами и данными выбранных заметок.</string>
<string name="av_locations_all_desc">Файл GPX с координатами и данными всех заметок.</string>
@ -2878,7 +2877,7 @@
<string name="add_destination_point">Добавить пункт назначения</string>
<string name="add_intermediate_point">Добавить промежуточный пункт</string>
<string name="add_start_point">Добавить пункт отправления</string>
<string name="route_way">Путь: %1$s</string>
<string name="route_way">Путь</string>
<string name="points_of_interests">Точки интереса (POI)</string>
<string name="waiting_for_route_calculation">Ожидание расчета маршрута</string>
<string name="app_mode_public_transport">Общественный транспорт</string>
@ -2895,8 +2894,8 @@
<string name="shared_string_capacity">Объем</string>
<string name="shared_string_width">Ширина</string>
<string name="shared_string_height">Высота</string>
<string name="transfers">трансферы: %1$s</string>
<string name="on_foot">пешком: %1$s</string>
<string name="transfers">трансферы</string>
<string name="on_foot">пешком</string>
<string name="show_along_the_route">Показывать вдоль маршрута</string>
<string name="route_surface_stat_container">Поверхность</string>
<string name="route_class_stat_container">Класс</string>

View file

@ -2875,7 +2875,6 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="quick_action_switch_night_mode">Modalidade pro sa note</string>
<string name="quick_action_day_night_switch_mode">Cola intre Die/Note</string>
<string name="add_destination_point">Annanghe una destinatzione</string>
<string name="waypoints">Puntos de coladòrgiu: %1$s</string>
<string name="cubic_m"></string>
<string name="metric_ton">t</string>
<string name="shared_string_capacity">Capatzidade</string>
@ -2884,10 +2883,10 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="swap_start_and_destination">Cuncàmbia sa partèntzia e sa destinatzione</string>
<string name="add_intermediate_point">Annanghe unu puntu de coladòrgiu</string>
<string name="add_start_point">Annanghe unu puntu de incumintzu</string>
<string name="intermediate_waypoint">Puntu de coladòrgiu: %1$s</string>
<string name="transfers">tramudadas: %1$s</string>
<string name="on_foot">a pede: %1$s</string>
<string name="route_way">Modalidade: %1$s</string>
<string name="intermediate_waypoint">Puntu de coladòrgiu</string>
<string name="transfers">tramudadas</string>
<string name="on_foot">a pede</string>
<string name="route_way">Modalidade</string>
<string name="points_of_interests">Puntos de interesse (PDI)</string>
<string name="waiting_for_route_calculation">Isetende pro su càlculu de s\'àndala</string>
<string name="app_mode_public_transport">Trasportu pùblicu</string>
@ -2896,7 +2895,7 @@ Pro praghere iscrie su còdighe intreu</string>
<string name="simulate_navigation">Sìmula su nàvigu</string>
<string name="choose_track_file_to_follow">Ischerta unu documentu de rasta de sighire</string>
<string name="voice_announcements">Annùntzios vocales</string>
<string name="intermediate_destinations">Destinatziones intermèdias: %1$s</string>
<string name="intermediate_destinations">Destinatziones intermèdias</string>
<string name="arrive_at_time">Arribada a sas %1$s</string>
<string name="route_class_stat_container">Classe</string>
<string name="route_surface_stat_container">Superfìtzie</string>

View file

@ -2883,11 +2883,10 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="add_destination_point">Pridať cieľ</string>
<string name="add_intermediate_point">Pridať medzicieľ</string>
<string name="add_start_point">Pridať štartovací bod</string>
<string name="intermediate_waypoint">Prechodný bod: %1$s</string>
<string name="waypoints">Body na ceste: %1$s</string>
<string name="transfers">prestupy: %1$s</string>
<string name="on_foot">peši: %1$s</string>
<string name="route_way">Cesta: %1$s</string>
<string name="intermediate_waypoint">Prechodný bod</string>
<string name="transfers">prestupy</string>
<string name="on_foot">peši</string>
<string name="route_way">Cesta</string>
<string name="points_of_interests">Body záujmu (POI)</string>
<string name="waiting_for_route_calculation">Čakám na výpočet trasy</string>
<string name="app_mode_public_transport">Verejná doprava</string>
@ -2896,7 +2895,7 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="simulate_navigation">Simulovať navigáciu</string>
<string name="choose_track_file_to_follow">Zvoľte súbor trasy, ktorú chcete nasledovať</string>
<string name="voice_announcements">Hlasové oznámenia</string>
<string name="intermediate_destinations">Medziciele: %1$s</string>
<string name="intermediate_destinations">Medziciele</string>
<string name="arrive_at_time">Príjazd o %1$s</string>
<string name="route_class_stat_container">Trieda</string>
<string name="route_surface_stat_container">Povrch</string>

View file

@ -3197,11 +3197,10 @@ Koda predstavlja območje: %1$s x %2$s</string>
<string name="add_destination_point">Dodaj cilj</string>
<string name="add_intermediate_point">Dodaj vmesni cilj</string>
<string name="add_start_point">Dodaj začetno točko</string>
<string name="intermediate_waypoint">Vmesna točka: %1$s</string>
<string name="waypoints">Vmesne točke: %1$s</string>
<string name="transfers">prevozi: %1$s</string>
<string name="on_foot">hoja: %1$s</string>
<string name="route_way">Pot: %1$s</string>
<string name="intermediate_waypoint">Vmesna točka</string>
<string name="transfers">prevozi</string>
<string name="on_foot">hoja</string>
<string name="route_way">Pot</string>
<string name="points_of_interests">Točke zanimanja (POI)</string>
<string name="waiting_for_route_calculation">Poteka preračunavanje poti</string>
<string name="app_mode_public_transport">Javni prevozi</string>
@ -3210,7 +3209,7 @@ Koda predstavlja območje: %1$s x %2$s</string>
<string name="simulate_navigation">Izvedi navidezno navigacijo</string>
<string name="choose_track_file_to_follow">Izberite datoteko poti za sledenje</string>
<string name="voice_announcements">Glasovne najave</string>
<string name="intermediate_destinations">Vmesni cilji: %1$s</string>
<string name="intermediate_destinations">Vmesni cilji</string>
<string name="arrive_at_time">Prihod ob %1$s</string>
<string name="powered_by_osmand">S podporo OsmAnd</string>
<string name="mapillary_menu_title_pano">Pokaži le 360° slike</string>

View file

@ -2909,11 +2909,10 @@
<string name="add_destination_point">Додај одредиште</string>
<string name="add_intermediate_point">Додај успутну станицу</string>
<string name="add_start_point">Додај почетну тачку</string>
<string name="intermediate_waypoint">"Успутне тачке: %1$s "</string>
<string name="waypoints">Пролазне тачке: %1$s</string>
<string name="transfers">преседања: %1$s</string>
<string name="on_foot">"пешице: %1$s "</string>
<string name="route_way">Пут: %1$s</string>
<string name="intermediate_waypoint">Успутне тачке</string>
<string name="transfers">преседања</string>
<string name="on_foot">пешице</string>
<string name="route_way">Пут</string>
<string name="points_of_interests">Тачке од интереса (POI)</string>
<string name="waiting_for_route_calculation">Чекање на израчунавање пута</string>
<string name="app_mode_public_transport">Јавни саобраћај</string>
@ -2922,7 +2921,7 @@
<string name="simulate_navigation">Симулирај навођење</string>
<string name="choose_track_file_to_follow">Одаберите фајл путање за праћење</string>
<string name="voice_announcements">Гласовне најаве</string>
<string name="intermediate_destinations">"Успутна одредишта: %1$s "</string>
<string name="intermediate_destinations">Успутна одредишта</string>
<string name="arrive_at_time">"Долазак у %1$s "</string>
<string name="route_class_stat_container">Класа</string>
<string name="route_surface_stat_container">Подлога</string>

View file

@ -2770,11 +2770,10 @@ Vänligen tillhandahåll fullständig kod</string>
<string name="add_destination_point">Lägg till destination</string>
<string name="add_intermediate_point">Lägg till hållplats</string>
<string name="add_start_point">Lägg till startpunkt</string>
<string name="intermediate_waypoint">Hållplats: %1$s</string>
<string name="waypoints">Hållpunkter: %1$s</string>
<string name="transfers">övergångar: %1$s</string>
<string name="on_foot">till fots: %1$s</string>
<string name="route_way">Väg: %1$s</string>
<string name="intermediate_waypoint">Hållplats</string>
<string name="transfers">övergångar</string>
<string name="on_foot">till fots</string>
<string name="route_way">Väg</string>
<string name="points_of_interests">Intressepunkter (IP)</string>
<string name="waiting_for_route_calculation">Väntar på beräkning av rutten</string>
<string name="app_mode_public_transport">Kollektivtrafik</string>
@ -2783,6 +2782,6 @@ Vänligen tillhandahåll fullständig kod</string>
<string name="simulate_navigation">Simulera navigering</string>
<string name="choose_track_file_to_follow">Välj en spårfil att följa</string>
<string name="voice_announcements">Röstmeddelanden</string>
<string name="intermediate_destinations">Mellanliggande destinationer: %1$s</string>
<string name="intermediate_destinations">Mellanliggande destinationer</string>
<string name="arrive_at_time">Ankomst klockan %1$s</string>
</resources>

View file

@ -2875,16 +2875,15 @@
<string name="add_destination_point">增加目的地</string>
<string name="add_intermediate_point">增加中轉</string>
<string name="add_start_point">新增起始點</string>
<string name="intermediate_waypoint">中轉地點:%1$s</string>
<string name="waypoints">航點:%1$s</string>
<string name="transfers">移動:%1$s</string>
<string name="intermediate_waypoint">中轉地點</string>
<string name="transfers">移動</string>
<string name="cubic_m">立方公尺</string>
<string name="metric_ton">公噸</string>
<string name="shared_string_capacity">容量</string>
<string name="shared_string_width">寬度</string>
<string name="shared_string_height">高度</string>
<string name="on_foot">步行%1$s</string>
<string name="route_way">道路%1$s</string>
<string name="on_foot">步行</string>
<string name="route_way">道路</string>
<string name="points_of_interests">興趣點 (POI)</string>
<string name="waiting_for_route_calculation">等待計算路徑</string>
<string name="app_mode_public_transport">大眾運輸</string>
@ -2893,7 +2892,7 @@
<string name="simulate_navigation">模擬導航</string>
<string name="choose_track_file_to_follow">選擇要跟隨的軌跡檔案</string>
<string name="voice_announcements">語音通知</string>
<string name="intermediate_destinations">中轉地點%1$s</string>
<string name="intermediate_destinations">中轉地點</string>
<string name="arrive_at_time">到達 %1$s</string>
<string name="quick_action_switch_day_night_descr">輕觸此動作按鈕以在 OsmAnd 的日間與夜間模式間切換</string>
<string name="quick_action_switch_day_mode">日間模式</string>

View file

@ -280,6 +280,7 @@
<dimen name="route_info_card_row_min_height">60dp</dimen>
<dimen name="route_info_card_item_height">56dp</dimen>
<dimen name="route_info_list_text_padding">54dp</dimen>
<dimen name="route_info_legend_padding">8dp</dimen>
<dimen name="multi_selection_header_height">52dp</dimen>

View file

@ -10,6 +10,11 @@
- For wording and consistency, please note https://osmand.net/help-online?id=technical-articles#Creating_a_Consistent_User_Experience
Thx - Hardy
-->
<string name="by_transport_type">By %1$s</string>
<string name="step_by_step">Step by step</string>
<string name="road_types">Road types</string>
<string name="exit_at">Exit at</string>
<string name="sit_on_the_stop">Sit on the stop</string>
<string name="shared_string_swap">Swap</string>
<string name="show_more">Show more</string>
<string name="tracks_on_map">Tracks on the map</string>
@ -26,11 +31,10 @@
<string name="add_destination_point">Add destination</string>
<string name="add_intermediate_point">Add intermediate</string>
<string name="add_start_point">Add starting point</string>
<string name="intermediate_waypoint">Intermediate point: %1$s</string>
<string name="waypoints">Waypoints: %1$s</string>
<string name="transfers">Transfers: %1$s</string>
<string name="on_foot">On foot: %1$s</string>
<string name="route_way">Way: %1$s</string>
<string name="intermediate_waypoint">Intermediate point</string>
<string name="transfers">Transfers</string>
<string name="on_foot">On foot</string>
<string name="route_way">Way</string>
<string name="points_of_interests">Points of interest (POI)</string>
<string name="waiting_for_route_calculation">Calculating route…</string>
<string name="app_mode_public_transport">Public transport</string>
@ -39,7 +43,7 @@
<string name="simulate_navigation">Simulate navigation</string>
<string name="choose_track_file_to_follow">Choose track file to follow</string>
<string name="voice_announcements">Voice announcements</string>
<string name="intermediate_destinations">Intermediate destinations: %1$s</string>
<string name="intermediate_destinations">Intermediate destinations</string>
<string name="arrive_at_time">Arrive at %1$s</string>
<string name="osm_live_subscriptions">Subscriptions</string>
<string name="powered_by_osmand">By OsmAnd</string>

View file

@ -41,15 +41,13 @@ import android.view.View;
import android.view.ViewParent;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;
import net.osmand.plus.R;
import net.osmand.plus.download.DownloadActivity;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
@ -320,6 +318,15 @@ public class AndroidUtils {
}
}
public static void updateImageButton(Context ctx, ImageButton button, int iconLightId, int iconDarkId, int bgLightId, int bgDarkId, boolean night) {
button.setImageDrawable(ctx.getResources().getDrawable(night ? iconDarkId : iconLightId));
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
button.setBackground(ctx.getResources().getDrawable(night ? bgDarkId : bgLightId, ctx.getTheme()));
} else {
button.setBackgroundDrawable(ctx.getResources().getDrawable(night ? bgDarkId : bgLightId));
}
}
public static void setDashButtonBackground(Context ctx, View view, boolean night) {
setBackground(ctx, view, night, R.drawable.dashboard_button_light, R.drawable.dashboard_button_dark);
}

View file

@ -1,5 +1,6 @@
package net.osmand.plus.dashboard;
import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
@ -39,8 +40,10 @@ public class DashNavigationFragment extends DashBaseFragment {
(view.findViewById(R.id.show_all)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ShowRouteInfoDialogFragment.showDialog(getActivity().getSupportFragmentManager());
Activity activity = getActivity();
if (activity instanceof MapActivity) {
ShowRouteInfoDialogFragment.showInstance((MapActivity) activity, -1);
}
}
});
return view;

View file

@ -9,6 +9,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.net.Uri;
@ -37,12 +38,16 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.github.mikephil.charting.charts.HorizontalBarChart;
import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.components.MarkerView;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.BarData;
import com.github.mikephil.charting.data.BarDataSet;
import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.data.ChartData;
import com.github.mikephil.charting.data.DataSet;
import com.github.mikephil.charting.data.Entry;
@ -86,7 +91,9 @@ import net.osmand.plus.dialogs.ConfigureMapMenu.GpxAppearanceAdapter;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.routing.RouteCalculationResult;
import net.osmand.render.RenderingRuleProperty;
import net.osmand.render.RenderingRuleSearchRequest;
import net.osmand.render.RenderingRulesStorage;
import net.osmand.router.RouteStatistics;
import net.osmand.util.Algorithms;
import net.osmand.util.MapUtils;
@ -1040,7 +1047,7 @@ public class GpxUiHelper {
legend.setEnabled(false);
}
private static float setupXAxisDistance(OsmandApplication ctx, XAxis xAxis, float meters) {
private static float setupAxisDistance(OsmandApplication ctx, AxisBase axisBase, float meters) {
OsmandSettings settings = ctx.getSettings();
OsmandSettings.MetricsConstants mc = settings.METRIC_SYSTEM.get();
float divX;
@ -1099,8 +1106,8 @@ public class GpxUiHelper {
final String formatX = fmt;
final String mainUnitX = ctx.getString(mainUnitStr);
xAxis.setGranularity(granularity);
xAxis.setValueFormatter(new IAxisValueFormatter() {
axisBase.setGranularity(granularity);
axisBase.setValueFormatter(new IAxisValueFormatter() {
@Override
public String getFormattedValue(float value, AxisBase axis) {
@ -1191,6 +1198,114 @@ public class GpxUiHelper {
return values;
}
public static void setupHorizontalGPXChart(HorizontalBarChart chart, int yLabelsCount, float topOffset, float bottomOffset, boolean useGesturesAndScale) {
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
chart.setHardwareAccelerationEnabled(false);
} else {
chart.setHardwareAccelerationEnabled(true);
}
chart.setTouchEnabled(useGesturesAndScale);
chart.setDragEnabled(useGesturesAndScale);
chart.setScaleYEnabled(false);
chart.setAutoScaleMinMaxEnabled(true);
chart.setDrawBorders(false);
chart.getDescription().setEnabled(false);
chart.setDragDecelerationEnabled(false);
chart.setExtraTopOffset(topOffset);
chart.setExtraBottomOffset(bottomOffset);
XAxis xl = chart.getXAxis();
xl.setDrawLabels(false);
xl.setEnabled(false);
xl.setDrawAxisLine(false);
xl.setDrawGridLines(false);
YAxis yl = chart.getAxisLeft();
yl.setLabelCount(yLabelsCount);
yl.setDrawLabels(false);
yl.setEnabled(false);
yl.setDrawAxisLine(false);
yl.setDrawGridLines(false);
yl.setAxisMinimum(0f);
YAxis yr = chart.getAxisRight();
yr.setLabelCount(yLabelsCount);
yr.setDrawAxisLine(false);
yr.setDrawGridLines(false);
yr.setAxisMinimum(0f);
chart.setFitBars(true);
Legend l = chart.getLegend();
l.setEnabled(false);
}
public static <E> BarData buildStatisticChart(@NonNull OsmandApplication app,
@NonNull HorizontalBarChart mChart,
@NonNull RouteStatistics.Statistics<E> routeStatistics,
@NonNull GPXTrackAnalysis analysis,
boolean useRightAxis,
boolean nightMode) {
XAxis xAxis = mChart.getXAxis();
xAxis.setEnabled(false);
YAxis yAxis;
if (useRightAxis) {
yAxis = mChart.getAxisRight();
yAxis.setEnabled(true);
} else {
yAxis = mChart.getAxisLeft();
}
float divX = setupAxisDistance(app, yAxis, analysis.totalDistance);
List<RouteStatistics.RouteSegmentAttribute<E>> segments = routeStatistics.getElements();
List<BarEntry> entries = new ArrayList<>();
float[] stacks = new float[segments.size()];
int[] colors = new int[segments.size()];
for (int i = 0; i < stacks.length; i++) {
RouteStatistics.RouteSegmentAttribute segment = segments.get(i);
stacks[i] = segment.getDistance() / divX;
colors[i] = getColorFromRouteSegmentAttribute(app, segment, nightMode);
}
entries.add(new BarEntry(0, stacks));
BarDataSet barDataSet = new BarDataSet(entries, "");
barDataSet.setColors(colors);
BarData dataSet = new BarData(barDataSet);
dataSet.setDrawValues(false);
mChart.getAxisRight().setAxisMaximum(dataSet.getYMax());
mChart.getAxisLeft().setAxisMaximum(dataSet.getYMax());
return dataSet;
}
public static int getColorFromRouteSegmentAttribute(OsmandApplication app, RouteStatistics.RouteSegmentAttribute segment, boolean nightMode) {
String colorAttrName = segment.getColorAttrName();
String colorName = segment.getColorName();
int color = 0;
if (colorName != null) {
try {
color = Color.parseColor(colorName);
} catch (Exception e) {
}
} else if (colorAttrName != null) {
color = GpxUiHelper.getColorFromStyle(app, colorAttrName, nightMode);
}
return color;
}
public static int getColorFromStyle(OsmandApplication app, String colorAttrName, boolean nightMode) {
RenderingRulesStorage rrs = app.getRendererRegistry().getCurrentSelectedRenderer();
RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs);
req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, nightMode);
if (req.searchRenderingAttribute(colorAttrName)) {
return req.getIntPropertyValue(rrs.PROPS.R_ATTR_COLOR_VALUE);
}
return 0;
}
public static OrderedLineDataSet createGPXElevationDataSet(@NonNull OsmandApplication ctx,
@NonNull LineChart mChart,
@NonNull GPXTrackAnalysis analysis,
@ -1208,7 +1323,7 @@ public class GpxUiHelper {
if (axisType == GPXDataSetAxisType.TIME && analysis.isTimeSpecified()) {
divX = setupXAxisTime(xAxis, analysis.timeSpan);
} else {
divX = setupXAxisDistance(ctx, xAxis, analysis.totalDistance);
divX = setupAxisDistance(ctx, xAxis, analysis.totalDistance);
}
final String mainUnitY = useFeet ? ctx.getString(R.string.foot) : ctx.getString(R.string.m);
@ -1292,7 +1407,7 @@ public class GpxUiHelper {
if (axisType == GPXDataSetAxisType.TIME && analysis.isTimeSpecified()) {
divX = setupXAxisTime(xAxis, analysis.timeSpan);
} else {
divX = setupXAxisDistance(ctx, xAxis, analysis.totalDistance);
divX = setupAxisDistance(ctx, xAxis, analysis.totalDistance);
}
OsmandSettings.SpeedConstants sps = settings.SPEED_SYSTEM.get();
@ -1445,7 +1560,7 @@ public class GpxUiHelper {
final float totalDistance = analysis.totalDistance;
XAxis xAxis = mChart.getXAxis();
float divX = setupXAxisDistance(ctx, xAxis, analysis.totalDistance);
float divX = setupAxisDistance(ctx, xAxis, analysis.totalDistance);
final String mainUnitY = "%";

View file

@ -3,6 +3,7 @@ package net.osmand.plus.mapcontextmenu;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@ -484,10 +485,13 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button);
zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button);
if (menu.zoomButtonsVisible()) {
updateImageButton(zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
Context ctx = getContext();
if (ctx != null) {
AndroidUtils.updateImageButton(ctx, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
updateImageButton(zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
AndroidUtils.updateImageButton(ctx, zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
}
zoomInButtonView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -168,14 +168,14 @@ public class MenuBuilder {
private boolean collapsed;
private CollapseExpandListener collapseExpandListener;
public CollapsableView(@NonNull View contenView, @NonNull MenuBuilder menuBuilder,
public CollapsableView(@NonNull View contenView, MenuBuilder menuBuilder,
@NonNull OsmandPreference<Boolean> collapsedPref) {
this.contenView = contenView;
this.menuBuilder = menuBuilder;
this.collapsedPref = collapsedPref;
}
public CollapsableView(@NonNull View contenView, @NonNull MenuBuilder menuBuilder, boolean collapsed) {
public CollapsableView(@NonNull View contenView, MenuBuilder menuBuilder, boolean collapsed) {
this.contenView = contenView;
this.collapsed = collapsed;
this.menuBuilder = menuBuilder;
@ -202,7 +202,7 @@ public class MenuBuilder {
if (collapseExpandListener != null) {
collapseExpandListener.onCollapseExpand(collapsed);
}
if (menuBuilder.collapseExpandListener != null) {
if (menuBuilder != null && menuBuilder.collapseExpandListener != null) {
menuBuilder.collapseExpandListener.onCollapseExpand(collapsed);
}
}
@ -770,26 +770,8 @@ public class MenuBuilder {
}
}
private String adjustRouteRef(String ref) {
if (ref != null) {
int charPos = ref.lastIndexOf(':');
if (charPos != -1) {
ref = ref.substring(0, charPos);
}
if (ref.length() > 4) {
ref = ref.substring(0, 4);
}
}
return ref;
}
public int dpToPx(float dp) {
Resources r = app.getResources();
return (int) TypedValue.applyDimension(
COMPLEX_UNIT_DIP,
dp,
r.getDisplayMetrics()
);
return AndroidUtils.dpToPx(app, dp);
}
public Drawable getCollapseIcon(boolean collapsed) {
@ -823,7 +805,7 @@ public class MenuBuilder {
transportRect.setTextColor(UiUtilities.getContrastColor(app, bgColor, true));
transportRect.setBackgroundDrawable(shape);
transportRect.setText(adjustRouteRef(route.route.getRef()));
transportRect.setText(route.route.getAdjustedRouteRef());
baseView.addView(transportRect);
LinearLayout infoView = new LinearLayout(view.getContext());

View file

@ -2,7 +2,6 @@ package net.osmand.plus.routepreparationmenu;
import android.Manifest;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
@ -28,6 +27,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.ShowRouteInfoDialogFragment;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.routepreparationmenu.cards.PublicTransportCard;
@ -115,9 +115,9 @@ public class ChooseRouteFragment extends BaseOsmAndFragment {
ImageButton zoomOutButtonView = (ImageButton) view.findViewById(R.id.map_zoom_out_button);
myLocButtonView = (ImageButton) view.findViewById(R.id.map_my_location_button);
if (portrait) {
updateImageButton(zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
AndroidUtils.updateImageButton(mapActivity, zoomInButtonView, R.drawable.map_zoom_in, R.drawable.map_zoom_in_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
updateImageButton(zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
AndroidUtils.updateImageButton(mapActivity,zoomOutButtonView, R.drawable.map_zoom_out, R.drawable.map_zoom_out_night,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
zoomInButtonView.setOnClickListener(new View.OnClickListener() {
@Override
@ -273,16 +273,6 @@ public class ChooseRouteFragment extends BaseOsmAndFragment {
getMapActivity().changeZoom(-1, System.currentTimeMillis());
}
private void updateImageButton(ImageButton button, int iconLightId, int iconDarkId, int bgLightId, int bgDarkId, boolean night) {
button.setImageDrawable(getMapActivity().getMyApplication().getUIUtilities().getIcon(night ? iconDarkId : iconLightId));
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
button.setBackground(getMapActivity().getResources().getDrawable(night ? bgDarkId : bgLightId,
getMapActivity().getTheme()));
} else {
button.setBackgroundDrawable(getMapActivity().getResources().getDrawable(night ? bgDarkId : bgLightId));
}
}
@Override
protected Drawable getContentIcon(@DrawableRes int id) {
return getIcon(id, nightMode ? R.color.ctx_menu_info_text_dark : R.color.icon_color);
@ -304,7 +294,7 @@ public class ChooseRouteFragment extends BaseOsmAndFragment {
try {
fragment.setRetainInstance(true);
fragmentManager.beginTransaction()
.add(R.id.fragmentContainer, fragment, ChooseRouteFragment.TAG)
.add(R.id.routeMenuContainer, fragment, ChooseRouteFragment.TAG)
.commitAllowingStateLoss();
return true;
} catch (Exception e) {
@ -355,8 +345,12 @@ public class ChooseRouteFragment extends BaseOsmAndFragment {
view.findViewById(R.id.details_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mapActivity.getMyApplication().getTransportRoutingHelper().setCurrentRoute(cards.get(position).getRouteId());
if (position < cards.size()) {
int routeId = cards.get(position).getRouteId();
mapActivity.getMyApplication().getTransportRoutingHelper().setCurrentRoute(routeId);
mapActivity.getMapView().refreshMap(true);
ShowRouteInfoDialogFragment.showInstance(mapActivity, routeId);
}
}
});
view.findViewById(R.id.show_button).setOnClickListener(new View.OnClickListener() {

View file

@ -1038,7 +1038,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
viaLayout.setVisibility(View.VISIBLE);
viaLayoutDivider.setVisibility(View.VISIBLE);
((TextView) mainView.findViewById(R.id.ViaView)).setText(via);
((TextView) mainView.findViewById(R.id.ViaSubView)).setText(app.getString(R.string.intermediate_destinations, getTargets().getIntermediatePoints().size()));
((TextView) mainView.findViewById(R.id.ViaSubView)).setText(app.getString(R.string.intermediate_destinations) + ": " + getTargets().getIntermediatePoints().size());
}
FrameLayout viaButton = (FrameLayout) mainView.findViewById(R.id.via_button);

View file

@ -595,7 +595,8 @@ public class WaypointsFragment extends BaseOsmAndFragment implements ObservableS
private void updateTitle() {
final TextViewEx title = (TextViewEx) view.findViewById(R.id.title);
int pointsSize = app.getTargetPointsHelper().getAllPoints().size();
title.setText(app.getString(R.string.waypoints, (pointsSize != 0 ? pointsSize : 1)));
String text = getString(R.string.shared_string_waypoints) + ": " + (pointsSize != 0 ? pointsSize : 1);
title.setText(text);
}
private void applyPointsChanges() {
@ -861,8 +862,7 @@ public class WaypointsFragment extends BaseOsmAndFragment implements ObservableS
return new PointDescription(PointDescription.POINT_TYPE_TARGET, ctx.getString(R.string.route_descr_destination) + ":",
point.getOnlyName());
} else {
return new PointDescription(PointDescription.POINT_TYPE_TARGET, ctx.getString(R.string.intermediate_waypoint, "" + (point.index + 1)),
point.getOnlyName());
return new PointDescription(PointDescription.POINT_TYPE_TARGET, ctx.getString(R.string.intermediate_waypoint) + ": " + (point.index + 1), point.getOnlyName());
}
}

View file

@ -39,6 +39,10 @@ public abstract class BaseCard {
public abstract int getCardLayoutId();
public int getViewHeight() {
return view != null ? view.getHeight() : 0;
}
public void update() {
if (view != null) {
updateContent();

View file

@ -15,15 +15,14 @@ import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportStop;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.ShowRouteInfoDialogFragment;
import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.widgets.FlowLayout;
import net.osmand.plus.transport.TransportStopRoute;
import net.osmand.plus.transport.TransportStopType;
import net.osmand.plus.widgets.FlowLayout;
import net.osmand.plus.widgets.style.CustomTypefaceSpan;
import net.osmand.router.TransportRoutePlanner.TransportRouteResult;
import net.osmand.router.TransportRoutePlanner.TransportRouteResultSegment;
@ -69,6 +68,7 @@ public class PublicTransportCard extends BaseCard {
public void onClick(View v) {
app.getTransportRoutingHelper().setCurrentRoute(routeId);
getMapActivity().refreshMap();
ShowRouteInfoDialogFragment.showInstance(mapActivity, routeId);
}
});
view.findViewById(R.id.bottom_shadow).setVisibility(showBottomShadow ? View.VISIBLE : View.GONE);
@ -129,7 +129,7 @@ public class PublicTransportCard extends BaseCard {
String firstLine = app.getString(R.string.route_from) + " " + name;
if (segments.size() > 1) {
firstLine += ", " + app.getString(R.string.transfers, (segments.size() - 1));
firstLine += ", " + app.getString(R.string.transfers) +": "+(segments.size() - 1);
}
SpannableString firstLineDesc = new SpannableString(firstLine);
@ -146,9 +146,9 @@ public class PublicTransportCard extends BaseCard {
Typeface typeface = FontCache.getRobotoMedium(app);
String travelTime = OsmAndFormatter.getFormattedDuration((int) routeResult.getTravelTime(), app);
String walkTime = OsmAndFormatter.getFormattedDuration((int) routeResult.getWalkTime(), app);
String walkDistance = OsmAndFormatter.getFormattedDistance((int) routeResult.getTravelDist(), app);
String walkDistance = OsmAndFormatter.getFormattedDistance((int) routeResult.getWalkDist(), app);
String secondLine = app.getString(R.string.route_way, travelTime) + "" + app.getString(R.string.on_foot, walkTime) + "" + walkDistance;
String secondLine = app.getString(R.string.route_way) + ": " + travelTime + "" + app.getString(R.string.on_foot) + ": " + walkTime + "" + walkDistance;
SpannableString secondLineDesc = new SpannableString(secondLine);
@ -172,7 +172,7 @@ public class PublicTransportCard extends BaseCard {
Iterator<TransportRouteResultSegment> iterator = segments.iterator();
while (iterator.hasNext()) {
TransportRouteResultSegment s = iterator.next();
if (s.walkDist != 0) {
if (s.walkDist > 0) {
double walkTime = getWalkTime(s.walkDist, routeResult.getWalkSpeed());
if (walkTime > MIN_WALK_TIME) {
String walkTimeS = OsmAndFormatter.getFormattedDuration((int) walkTime, app);
@ -201,7 +201,7 @@ public class PublicTransportCard extends BaseCard {
LinearLayout convertView = (LinearLayout) getMapActivity().getLayoutInflater().inflate(R.layout.transport_stop_route_item_with_icon, null, false);
if (segment != null) {
TransportRoute transportRoute = segment.route;
TransportStopRoute transportStopRoute = getTransportStopRoute(transportRoute, segment.getStart());
TransportStopRoute transportStopRoute = TransportStopRoute.getTransportStopRoute(transportRoute, segment.getStart());
String routeRef = segment.route.getAdjustedRouteRef();
int bgColor = transportStopRoute.getColor(app, nightMode);
@ -209,7 +209,8 @@ public class PublicTransportCard extends BaseCard {
TextView transportStopRouteTextView = (TextView) convertView.findViewById(R.id.transport_stop_route_text);
ImageView transportStopRouteImageView = (ImageView) convertView.findViewById(R.id.transport_stop_route_icon);
transportStopRouteImageView.setImageDrawable(app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_bus_dark, UiUtilities.getContrastColor(app, bgColor, true)));
int drawableResId = transportStopRoute.type == null ? R.drawable.ic_action_bus_dark : transportStopRoute.type.getResourceId();
transportStopRouteImageView.setImageDrawable(app.getUIUtilities().getPaintedIcon(drawableResId, UiUtilities.getContrastColor(app, bgColor, true)));
transportStopRouteTextView.setText(routeRef);
GradientDrawable gradientDrawableBg = (GradientDrawable) convertView.getBackground();
gradientDrawableBg.setColor(bgColor);
@ -227,11 +228,11 @@ public class PublicTransportCard extends BaseCard {
TextView transportStopRouteTextView = (TextView) convertView.findViewById(R.id.transport_stop_route_text);
ImageView transportStopRouteImageView = (ImageView) convertView.findViewById(R.id.transport_stop_route_icon);
transportStopRouteImageView.setImageDrawable(getActiveIcon(R.drawable.ic_action_pedestrian_dark));
transportStopRouteImageView.setImageDrawable(getColoredIcon(R.drawable.ic_action_pedestrian_dark, nightMode ? R.color.ctx_menu_bottom_view_url_color_dark : R.color.ctx_menu_bottom_view_url_color_light ));
transportStopRouteTextView.setText(walkTime);
GradientDrawable gradientDrawableBg = (GradientDrawable) convertView.getBackground();
gradientDrawableBg.setColor(bgColor);
transportStopRouteTextView.setTextColor(bgColor);
transportStopRouteTextView.setTextColor(ContextCompat.getColor(app, nightMode ? R.color.ctx_menu_bottom_view_url_color_dark : R.color.ctx_menu_bottom_view_url_color_light));
AndroidUtils.setBackground(app, convertView, nightMode, R.drawable.btn_border_active_light, R.drawable.btn_border_active_dark);
}
@ -242,22 +243,11 @@ public class PublicTransportCard extends BaseCard {
private View createArrow() {
LinearLayout container = new LinearLayout(app);
ImageView arrow = new ImageView(app);
arrow.setImageDrawable(getContentIcon(R.drawable.ic_arrow_forward));
arrow.setImageDrawable(getContentIcon(R.drawable.ic_action_arrow_forward_16));
container.addView(arrow, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, AndroidUtils.dpToPx(app, 28)));
return container;
}
private TransportStopRoute getTransportStopRoute(TransportRoute rs, TransportStop s) {
TransportStopType type = TransportStopType.findType(rs.getType());
TransportStopRoute r = new TransportStopRoute();
r.type = type;
r.desc = rs.getName();
r.route = rs;
r.stop = s;
r.refStop = s;
return r;
}
private double getWalkTime(double walkDist, double walkSpeed) {
return walkDist / walkSpeed;
}

View file

@ -0,0 +1,116 @@
package net.osmand.plus.routepreparationmenu.cards;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.StyleSpan;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.github.mikephil.charting.charts.HorizontalBarChart;
import com.github.mikephil.charting.data.BarData;
import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.router.RouteStatistics;
import net.osmand.util.Algorithms;
import java.util.Map;
public class RouteInfoCard extends BaseCard {
private MapActivity mapActivity;
private RouteStatistics.Statistics routeStatistics;
private GPXUtilities.GPXTrackAnalysis analysis;
public RouteInfoCard(MapActivity mapActivity, RouteStatistics.Statistics routeStatistics, GPXUtilities.GPXTrackAnalysis analysis) {
super(mapActivity);
this.mapActivity = mapActivity;
this.routeStatistics = routeStatistics;
this.analysis = analysis;
}
@Override
public int getCardLayoutId() {
return R.layout.route_info_card;
}
@Override
protected void updateContent() {
updateTitle();
final HorizontalBarChart chart = (HorizontalBarChart) view.findViewById(R.id.chart);
GpxUiHelper.setupHorizontalGPXChart(chart, 5, 10, 10, true);
BarData barData = GpxUiHelper.buildStatisticChart(app, chart, routeStatistics, analysis, true, nightMode);
chart.setData(barData);
LinearLayout container = view.findViewById(R.id.route_items);
attachLegend(container, routeStatistics);
}
@Override
protected void applyDayNightMode() {
view.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.route_info_bg_dark : R.color.route_info_bg_light));
TextView details = (TextView) view.findViewById(R.id.info_type_details);
details.setTextColor(ContextCompat.getColor(app, nightMode ? R.color.active_buttons_and_links_dark : R.color.active_buttons_and_links_light));
TextView title = (TextView) view.findViewById(R.id.info_type_title);
AndroidUtils.setTextPrimaryColor(app, title, nightMode);
}
private void updateTitle() {
TextView title = (TextView) view.findViewById(R.id.info_type_title);
String name = getInfoType();
title.setText(name);
}
private String getInfoType() {
if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.CLASS) {
return app.getString(R.string.road_types);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.STEEPNESS) {
return app.getString(R.string.route_steepness_stat_container);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.SMOOTHNESS) {
return app.getString(R.string.route_smoothness_stat_container);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.SURFACE) {
return app.getString(R.string.route_surface_stat_container);
} else {
return "";
}
}
private <E> void attachLegend(ViewGroup container, RouteStatistics.Statistics<E> routeStatistics) {
Map<E, RouteStatistics.RouteSegmentAttribute<E>> partition = routeStatistics.getPartition();
for (E key : partition.keySet()) {
RouteStatistics.RouteSegmentAttribute<E> segment = partition.get(key);
int color = GpxUiHelper.getColorFromRouteSegmentAttribute(app, segment, nightMode);
Drawable circle = app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, color);
Spannable text = getSpanLegend(key.toString(), segment);
TextView legend = new TextView(app);
AndroidUtils.setTextPrimaryColor(app, legend, nightMode);
legend.setTextSize(15);
legend.setGravity(Gravity.CENTER_VERTICAL);
legend.setCompoundDrawablePadding(AndroidUtils.dpToPx(app, 16));
legend.setPadding(AndroidUtils.dpToPx(app, 16), AndroidUtils.dpToPx(app, 4), AndroidUtils.dpToPx(app, 16), AndroidUtils.dpToPx(app, 4));
legend.setCompoundDrawablesWithIntrinsicBounds(circle, null, null, null);
legend.setText(text);
container.addView(legend);
}
}
private Spannable getSpanLegend(String title, RouteStatistics.RouteSegmentAttribute segment) {
String formattedDistance = OsmAndFormatter.getFormattedDistance(segment.getDistance(), getMyApplication());
title = Algorithms.capitalizeFirstLetter(title);
SpannableStringBuilder spannable = new SpannableStringBuilder(title);
spannable.append(": ");
spannable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.append(formattedDistance);
return spannable;
}
}

View file

@ -0,0 +1,221 @@
package net.osmand.plus.routepreparationmenu.cards;
import android.graphics.Matrix;
import android.support.v4.content.ContextCompat;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.github.mikephil.charting.charts.LineChart;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.highlight.Highlight;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
import com.github.mikephil.charting.listener.ChartTouchListener;
import com.github.mikephil.charting.listener.OnChartGestureListener;
import net.osmand.AndroidUtils;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.routing.RoutingHelper;
import java.util.ArrayList;
import java.util.List;
public class RouteStatisticCard extends BaseCard {
private MapActivity mapActivity;
private GPXFile gpx;
private GpxSelectionHelper.GpxDisplayItem gpxItem;
private GpxUiHelper.OrderedLineDataSet slopeDataSet;
private GpxUiHelper.OrderedLineDataSet elevationDataSet;
private View.OnTouchListener onTouchListener;
public RouteStatisticCard(MapActivity mapActivity, GPXFile gpx, View.OnTouchListener onTouchListener) {
super(mapActivity);
this.mapActivity = mapActivity;
this.gpx = gpx;
this.onTouchListener = onTouchListener;
makeGpxDisplayItem();
}
@Override
public int getCardLayoutId() {
return R.layout.route_info_header;
}
@Override
protected void updateContent() {
RoutingHelper routingHelper = mapActivity.getRoutingHelper();
view.setBackgroundColor(ContextCompat.getColor(mapActivity, nightMode ? R.color.route_info_bg_dark : R.color.route_info_bg_light));
OsmandApplication app = getMyApplication();
((ImageView) view.findViewById(R.id.distance_icon)).setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_route_distance));
((ImageView) view.findViewById(R.id.time_icon)).setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_time_span));
int dist = routingHelper.getLeftDistance();
int time = routingHelper.getLeftTime();
int hours = time / (60 * 60);
int minutes = (time / 60) % 60;
TextView distanceTv = (TextView) view.findViewById(R.id.distance);
AndroidUtils.setTextSecondaryColor(app, distanceTv, nightMode);
String text = OsmAndFormatter.getFormattedDistance(dist, app);
SpannableStringBuilder distanceStr = new SpannableStringBuilder(text);
int spaceIndex = text.indexOf(" ");
if (spaceIndex != -1) {
distanceStr.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, R.color.primary_text_light)), 0, spaceIndex, 0);
}
distanceTv.setText(distanceStr);
SpannableStringBuilder timeStr = new SpannableStringBuilder();
if (hours > 0) {
timeStr.append(String.valueOf(hours)).append(" ").append(app.getString(R.string.osmand_parking_hour)).append(" ");
}
if (minutes > 0) {
timeStr.append(String.valueOf(minutes)).append(" ").append(app.getString(R.string.osmand_parking_minute));
}
spaceIndex = timeStr.toString().lastIndexOf(" ");
if (spaceIndex != -1) {
timeStr.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, R.color.primary_text_light)), 0, spaceIndex, 0);
}
TextView timeTv = (TextView) view.findViewById(R.id.time);
AndroidUtils.setTextSecondaryColor(app, timeTv, nightMode);
timeTv.setText(timeStr);
TextView arriveTimeTv = (TextView) view.findViewById(R.id.time_desc);
String arriveStr = app.getString(R.string.arrive_at_time, OsmAndFormatter.getFormattedTime(time, true));
arriveTimeTv.setText(arriveStr);
GPXUtilities.GPXTrackAnalysis analysis = gpx.getAnalysis(0);
buildHeader(analysis);
((TextView) view.findViewById(R.id.average_text)).setText(OsmAndFormatter.getFormattedAlt(analysis.avgElevation, app));
String min = OsmAndFormatter.getFormattedAlt(analysis.minElevation, app);
String max = OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app);
((TextView) view.findViewById(R.id.range_text)).setText(min + " - " + max);
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
((TextView) view.findViewById(R.id.descent_text)).setText(desc);
((TextView) view.findViewById(R.id.ascent_text)).setText(asc);
((ImageView) view.findViewById(R.id.average_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_altitude_average));
((ImageView) view.findViewById(R.id.range_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_altitude_average));
((ImageView) view.findViewById(R.id.descent_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_altitude_descent));
((ImageView) view.findViewById(R.id.ascent_icon)).setImageDrawable(getContentIcon(R.drawable.ic_action_altitude_ascent));
}
@Override
protected void applyDayNightMode() {
}
public GpxUiHelper.OrderedLineDataSet getSlopeDataSet() {
return slopeDataSet;
}
public GpxUiHelper.OrderedLineDataSet getElevationDataSet() {
return elevationDataSet;
}
private void makeGpxDisplayItem() {
String groupName = getMyApplication().getString(R.string.current_route);
GpxSelectionHelper.GpxDisplayGroup group = getMyApplication().getSelectedGpxHelper().buildGpxDisplayGroup(gpx, 0, groupName);
if (group != null && group.getModifiableList().size() > 0) {
gpxItem = group.getModifiableList().get(0);
if (gpxItem != null) {
gpxItem.route = true;
}
}
}
private void buildHeader(GPXUtilities.GPXTrackAnalysis analysis) {
final LineChart mChart = (LineChart) view.findViewById(R.id.chart);
GpxUiHelper.setupGPXChart(app, mChart, 4);
mChart.setOnTouchListener(onTouchListener);
if (analysis.hasElevationData) {
List<ILineDataSet> dataSets = new ArrayList<>();
elevationDataSet = GpxUiHelper.createGPXElevationDataSet(app, mChart, analysis,
GpxUiHelper.GPXDataSetAxisType.DISTANCE, false, true);
if (elevationDataSet != null) {
dataSets.add(elevationDataSet);
}
slopeDataSet = GpxUiHelper.createGPXSlopeDataSet(app, mChart, analysis,
GpxUiHelper.GPXDataSetAxisType.DISTANCE, elevationDataSet.getValues(), true, true);
if (slopeDataSet != null) {
dataSets.add(slopeDataSet);
}
LineData data = new LineData(dataSets);
mChart.setData(data);
mChart.setOnChartGestureListener(new OnChartGestureListener() {
float highlightDrawX = -1;
@Override
public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
if (mChart.getHighlighted() != null && mChart.getHighlighted().length > 0) {
highlightDrawX = mChart.getHighlighted()[0].getDrawX();
} else {
highlightDrawX = -1;
}
}
@Override
public void onChartGestureEnd(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
gpxItem.chartMatrix = new Matrix(mChart.getViewPortHandler().getMatrixTouch());
Highlight[] highlights = mChart.getHighlighted();
if (highlights != null && highlights.length > 0) {
gpxItem.chartHighlightPos = highlights[0].getX();
} else {
gpxItem.chartHighlightPos = -1;
}
}
@Override
public void onChartLongPressed(MotionEvent me) {
}
@Override
public void onChartDoubleTapped(MotionEvent me) {
}
@Override
public void onChartSingleTapped(MotionEvent me) {
}
@Override
public void onChartFling(MotionEvent me1, MotionEvent me2, float velocityX, float velocityY) {
}
@Override
public void onChartScale(MotionEvent me, float scaleX, float scaleY) {
}
@Override
public void onChartTranslate(MotionEvent me, float dX, float dY) {
if (highlightDrawX != -1) {
Highlight h = mChart.getHighlightByTouchPoint(highlightDrawX, 0f);
if (h != null) {
mChart.highlightValue(h);
}
}
}
});
mChart.setVisibility(View.VISIBLE);
} else {
mChart.setVisibility(View.GONE);
}
}
}

View file

@ -56,7 +56,7 @@ public class SimpleRouteCard extends BaseCard {
info.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ShowRouteInfoDialogFragment.showDialog(mapActivity.getSupportFragmentManager());
ShowRouteInfoDialogFragment.showInstance(mapActivity, -1);
}
});
@ -64,42 +64,42 @@ public class SimpleRouteCard extends BaseCard {
ImageView durationIcon = (ImageView) view.findViewById(R.id.DurationIcon);
View infoDistanceView = view.findViewById(R.id.InfoDistance);
View infoDurationView = view.findViewById(R.id.InfoDuration);
if (directionInfo >= 0) {
infoIcon.setVisibility(View.GONE);
durationIcon.setVisibility(View.GONE);
infoDistanceView.setVisibility(View.GONE);
infoDurationView.setVisibility(View.GONE);
} else {
// if (directionInfo >= 0) {
// infoIcon.setVisibility(View.GONE);
// durationIcon.setVisibility(View.GONE);
// infoDistanceView.setVisibility(View.GONE);
// infoDurationView.setVisibility(View.GONE);
// } else {
infoIcon.setImageDrawable(getColoredIcon(R.drawable.ic_action_route_distance, R.color.route_info_unchecked_mode_icon_color));
infoIcon.setVisibility(View.VISIBLE);
durationIcon.setImageDrawable(getColoredIcon(R.drawable.ic_action_time_span, R.color.route_info_unchecked_mode_icon_color));
durationIcon.setVisibility(View.VISIBLE);
infoDistanceView.setVisibility(View.VISIBLE);
infoDurationView.setVisibility(View.VISIBLE);
}
if (directionInfo >= 0 && routingHelper.getRouteDirections() != null
&& directionInfo < routingHelper.getRouteDirections().size()) {
RouteDirectionInfo ri = routingHelper.getRouteDirections().get(directionInfo);
} else {
// }
// if (directionInfo >= 0 && routingHelper.getRouteDirections() != null
// && directionInfo < routingHelper.getRouteDirections().size()) {
// RouteDirectionInfo ri = routingHelper.getRouteDirections().get(directionInfo);
// } else {
TextView distanceText = (TextView) view.findViewById(R.id.DistanceText);
TextView distanceTitle = (TextView) view.findViewById(R.id.DistanceTitle);
TextView durationText = (TextView) view.findViewById(R.id.DurationText);
TextView durationTitle = (TextView) view.findViewById(R.id.DurationTitle);
distanceText.setText(OsmAndFormatter.getFormattedDistance(app.getRoutingHelper().getLeftDistance(), app));
distanceText.setText(OsmAndFormatter.getFormattedDistance(routingHelper.getLeftDistance(), app));
durationText.setText(OsmAndFormatter.getFormattedDuration(app.getRoutingHelper().getLeftTime(), app));
durationTitle.setText(app.getString(R.string.arrive_at_time, OsmAndFormatter.getFormattedTime(app.getRoutingHelper().getLeftTime(), true)));
durationText.setText(OsmAndFormatter.getFormattedDuration(routingHelper.getLeftTime(), app));
durationTitle.setText(app.getString(R.string.arrive_at_time, OsmAndFormatter.getFormattedTime(routingHelper.getLeftTime(), true)));
AndroidUtils.setTextPrimaryColor(app, distanceText, nightMode);
AndroidUtils.setTextSecondaryColor(app, distanceTitle, nightMode);
AndroidUtils.setTextPrimaryColor(app, durationText, nightMode);
AndroidUtils.setTextSecondaryColor(app, durationTitle, nightMode);
}
// }
view.findViewById(R.id.details_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ShowRouteInfoDialogFragment.showDialog(mapActivity.getSupportFragmentManager());
ShowRouteInfoDialogFragment.showInstance(mapActivity, -1);
}
});

View file

@ -91,7 +91,7 @@ public class TransportRoutingHelper {
@Nullable
public TransportRouteResult getCurrentRouteResult() {
if (routes != null && currentRoute < routes.size()) {
if (routes != null && currentRoute != -1 && currentRoute < routes.size()) {
return routes.get(currentRoute);
}
return null;

View file

@ -27,6 +27,17 @@ public class TransportStopRoute {
private boolean cachedNight;
private Map<Pair<String, Boolean>, Integer> cachedRouteColors = new HashMap<>();
public static TransportStopRoute getTransportStopRoute(TransportRoute rs, TransportStop s) {
TransportStopType type = TransportStopType.findType(rs.getType());
TransportStopRoute r = new TransportStopRoute();
r.type = type;
r.desc = rs.getName();
r.route = rs;
r.stop = s;
r.refStop = s;
return r;
}
public String getDescription(OsmandApplication ctx, boolean useDistance) {
if (useDistance && distance > 0) {
String nm = OsmAndFormatter.getFormattedDistance(distance, ctx);