diff --git a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java index 550b3e3b6b..3b003d1735 100644 --- a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java +++ b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java @@ -1536,52 +1536,42 @@ public class GPXUtilities { return new QuadRect(left, top, right, bottom); } - public int getGradientScaleColor(GradientScaleType gradientScaleType, int defColor) { + public int getGradientScaleColor(String gradientScaleType, int defColor) { String clrValue = null; if (extensions != null) { - clrValue = extensions.get(gradientScaleType.getTypeName()); + clrValue = extensions.get(gradientScaleType); } return parseColor(clrValue, defColor); } - public void setGradientScaleColor(GradientScaleType gradientScaleType, int gradientScaleColor) { - getExtensionsToWrite().put(gradientScaleType.getTypeName(), Algorithms.colorToString(gradientScaleColor)); + public void setGradientScaleColor(String gradientScaleType, int gradientScaleColor) { + getExtensionsToWrite().put(gradientScaleType, Algorithms.colorToString(gradientScaleColor)); } - public GradientScaleType getGradientScaleType() { + public String getGradientScaleType() { if (extensions != null) { - String gradientScaleTypeName = extensions.get("gradient_scale_type"); - if (!Algorithms.isEmpty(gradientScaleTypeName)) { - try { - return GradientScaleType.valueOf(gradientScaleTypeName); - } catch (IllegalArgumentException e) { - log.error("Error reading gradientScaleType", e); - } - } + return extensions.get("gradient_scale_type"); } return null; } - public void setGradientScaleType(GradientScaleType gradientScaleType) { - getExtensionsToWrite().put("gradient_scale_type", gradientScaleType.name()); + public void setGradientScaleType(String gradientScaleType) { + getExtensionsToWrite().put("gradient_scale_type", gradientScaleType); } - public GpxSplitType getSplitType() { + public void removeGradientScaleType() { + getExtensionsToWrite().remove("gradient_scale_type"); + } + + public String getSplitType() { if (extensions != null) { - String gradientScaleTypeName = extensions.get("split_type"); - if (!Algorithms.isEmpty(gradientScaleTypeName)) { - try { - return GpxSplitType.valueOf(gradientScaleTypeName); - } catch (IllegalArgumentException e) { - log.error("Error reading GpxSplitType", e); - } - } + return extensions.get("split_type"); } return null; } - public void setSplitType(GpxSplitType gpxSplitType) { - getExtensionsToWrite().put("split_type", gpxSplitType.name()); + public void setSplitType(String gpxSplitType) { + getExtensionsToWrite().put("split_type", gpxSplitType); } public double getSplitInterval() { @@ -1636,38 +1626,6 @@ public class GPXUtilities { public void setShowStartFinish(boolean showStartFinish) { getExtensionsToWrite().put("show_start_finish", String.valueOf(showStartFinish)); } - - public enum GradientScaleType { - SPEED("gradient_speed_color"), - ALTITUDE("gradient_altitude_color"), - SLOPE("gradient_slope_color"); - - private String typeName; - - GradientScaleType(String typeName) { - this.typeName = typeName; - } - - public String getTypeName() { - return typeName; - } - } - - public enum GpxSplitType { - NO_SPLIT(-1), - DISTANCE(1), - TIME(2); - - private int type; - - GpxSplitType(int type) { - this.type = type; - } - - public int getType() { - return type; - } - } } public static String asString(GPXFile file) { diff --git a/OsmAnd/res/drawable/bg_dash_line_dark.xml b/OsmAnd/res/drawable/bg_dash_line_dark.xml new file mode 100644 index 0000000000..ac1547e5af --- /dev/null +++ b/OsmAnd/res/drawable/bg_dash_line_dark.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/OsmAnd/res/drawable/bg_dash_line_light.xml b/OsmAnd/res/drawable/bg_dash_line_light.xml new file mode 100644 index 0000000000..508cf2e78f --- /dev/null +++ b/OsmAnd/res/drawable/bg_dash_line_light.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/OsmAnd/res/drawable/radio_button_center.xml b/OsmAnd/res/drawable/radio_button_center.xml new file mode 100644 index 0000000000..1c1304d0fc --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_center.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_center_dark.xml b/OsmAnd/res/drawable/radio_button_center_dark.xml new file mode 100644 index 0000000000..ee16a54e4a --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_center_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_center_light.xml b/OsmAnd/res/drawable/radio_button_center_light.xml new file mode 100644 index 0000000000..0ced063668 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_center_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_left.xml b/OsmAnd/res/drawable/radio_button_left.xml new file mode 100644 index 0000000000..838a3f4929 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_left.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_left_dark.xml b/OsmAnd/res/drawable/radio_button_left_dark.xml new file mode 100644 index 0000000000..235fe1c07a --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_left_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_left_light.xml b/OsmAnd/res/drawable/radio_button_left_light.xml new file mode 100644 index 0000000000..bb311906e4 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_left_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_center.xml b/OsmAnd/res/drawable/radio_button_regular_center.xml new file mode 100644 index 0000000000..e0cca408c5 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_center.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_center_dark.xml b/OsmAnd/res/drawable/radio_button_regular_center_dark.xml new file mode 100644 index 0000000000..f169338f05 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_center_dark.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_center_light.xml b/OsmAnd/res/drawable/radio_button_regular_center_light.xml new file mode 100644 index 0000000000..e0cca408c5 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_center_light.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_left.xml b/OsmAnd/res/drawable/radio_button_regular_left.xml new file mode 100644 index 0000000000..4a983673da --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_left.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_left_dark.xml b/OsmAnd/res/drawable/radio_button_regular_left_dark.xml new file mode 100644 index 0000000000..b841d52e72 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_left_dark.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_left_light.xml b/OsmAnd/res/drawable/radio_button_regular_left_light.xml new file mode 100644 index 0000000000..4a983673da --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_left_light.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_right.xml b/OsmAnd/res/drawable/radio_button_regular_right.xml new file mode 100644 index 0000000000..e2186a923b --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_right.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_right_dark.xml b/OsmAnd/res/drawable/radio_button_regular_right_dark.xml new file mode 100644 index 0000000000..4a54d73f04 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_right_dark.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_regular_right_light.xml b/OsmAnd/res/drawable/radio_button_regular_right_light.xml new file mode 100644 index 0000000000..e2186a923b --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_regular_right_light.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_right.xml b/OsmAnd/res/drawable/radio_button_right.xml new file mode 100644 index 0000000000..7c227b1319 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_right.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_right_dark.xml b/OsmAnd/res/drawable/radio_button_right_dark.xml new file mode 100644 index 0000000000..a699007a3a --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_right_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_right_light.xml b/OsmAnd/res/drawable/radio_button_right_light.xml new file mode 100644 index 0000000000..c875e76957 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_right_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_center.xml b/OsmAnd/res/drawable/radio_button_selected_center.xml new file mode 100644 index 0000000000..e429400abe --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_center.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_center_dark.xml b/OsmAnd/res/drawable/radio_button_selected_center_dark.xml new file mode 100644 index 0000000000..19757beaaf --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_center_dark.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_center_light.xml b/OsmAnd/res/drawable/radio_button_selected_center_light.xml new file mode 100644 index 0000000000..3f9db228c5 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_center_light.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_left.xml b/OsmAnd/res/drawable/radio_button_selected_left.xml new file mode 100644 index 0000000000..a96a06f544 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_left.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_left_dark.xml b/OsmAnd/res/drawable/radio_button_selected_left_dark.xml new file mode 100644 index 0000000000..e3477f5844 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_left_dark.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_left_light.xml b/OsmAnd/res/drawable/radio_button_selected_left_light.xml new file mode 100644 index 0000000000..08dd317994 --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_left_light.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_right.xml b/OsmAnd/res/drawable/radio_button_selected_right.xml new file mode 100644 index 0000000000..ffb60d307b --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_right.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_right_dark.xml b/OsmAnd/res/drawable/radio_button_selected_right_dark.xml new file mode 100644 index 0000000000..d535b6215f --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_right_dark.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_button_selected_right_light.xml b/OsmAnd/res/drawable/radio_button_selected_right_light.xml new file mode 100644 index 0000000000..0473c0140c --- /dev/null +++ b/OsmAnd/res/drawable/radio_button_selected_right_light.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_flat_text_selector.xml b/OsmAnd/res/drawable/radio_flat_text_selector.xml new file mode 100644 index 0000000000..359b2777c6 --- /dev/null +++ b/OsmAnd/res/drawable/radio_flat_text_selector.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_flat_text_selector_dark.xml b/OsmAnd/res/drawable/radio_flat_text_selector_dark.xml new file mode 100644 index 0000000000..119f4989b8 --- /dev/null +++ b/OsmAnd/res/drawable/radio_flat_text_selector_dark.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/radio_flat_text_selector_light.xml b/OsmAnd/res/drawable/radio_flat_text_selector_light.xml new file mode 100644 index 0000000000..359b2777c6 --- /dev/null +++ b/OsmAnd/res/drawable/radio_flat_text_selector_light.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_item_list_header.xml b/OsmAnd/res/layout/gpx_item_list_header.xml index 43ceaf7e3f..251eda21b6 100644 --- a/OsmAnd/res/layout/gpx_item_list_header.xml +++ b/OsmAnd/res/layout/gpx_item_list_header.xml @@ -158,42 +158,38 @@ - - - - - - - - + + + + + + + + - \ No newline at end of file diff --git a/OsmAnd/res/layout/track_appearance.xml b/OsmAnd/res/layout/track_appearance.xml new file mode 100644 index 0000000000..a302486a39 --- /dev/null +++ b/OsmAnd/res/layout/track_appearance.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/track_coloring_card.xml b/OsmAnd/res/layout/track_coloring_card.xml new file mode 100644 index 0000000000..47326a9ad7 --- /dev/null +++ b/OsmAnd/res/layout/track_coloring_card.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/track_split_interval.xml b/OsmAnd/res/layout/track_split_interval.xml new file mode 100644 index 0000000000..d81c89a0a8 --- /dev/null +++ b/OsmAnd/res/layout/track_split_interval.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/track_width_card.xml b/OsmAnd/res/layout/track_width_card.xml new file mode 100644 index 0000000000..8c99b94fd0 --- /dev/null +++ b/OsmAnd/res/layout/track_width_card.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index f1b70f0a6d..a39ed330db 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -3823,4 +3823,6 @@ Необходимо указать рабочие дни для продолжения Маршрут между пунктами План маршрута + Выберите нужный вариант разбиения: по времени или по расстоянию. + Выберите интервал с которым будут отображаться метки с расстоянием или временем на треке. \ No newline at end of file diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 6659534355..5ffd847b3a 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -133,6 +133,10 @@ + + + + diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index e4acc080d8..3b6763274b 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -471,7 +471,8 @@ #1A237BFF #1AD28521 - #80237BFF + #80237BFF + #80D28521 #80000000 #4DCCCCCC diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index 1c1a621495..50f53cdeb2 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -96,7 +96,8 @@ 3dp 14dp 6dp - + 60dp + 96dp 16dp 48dp diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 2875eb6fdb..1de9329e5e 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,13 @@ Thx - Hardy --> + Solid + Direction arrows + Custom + Select the desired splitting option: by time or by distance. + Select the interval at which marks with distance or time on the track will be displayed. + Select width + Show start finish icons Add to a Track Plan a route Route between points diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index 5b4dfd70b0..58d02716ed 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -296,6 +296,10 @@ @dimen/action_bar_height @style/ToolbarStyle @style/ToolbarStyle + @drawable/bg_dash_line_light + @drawable/radio_button_left_light + @drawable/radio_button_right_light + @drawable/radio_button_center_light