diff --git a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java index ede3b6f8cf..ed80b55b05 100644 --- a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java +++ b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java @@ -449,6 +449,10 @@ public class GPXUtilities { public String getArticleLang() { return getExtensionsToRead().get("article_lang"); } + + public String getDescription() { + return getExtensionsToRead().get("desc"); + } } public static class Author extends GPXExtensions { diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/io/NetworkUtils.java b/OsmAnd-java/src/main/java/net/osmand/osm/io/NetworkUtils.java index 7f5c008efd..9e4d858436 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/io/NetworkUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/io/NetworkUtils.java @@ -29,7 +29,7 @@ public class NetworkUtils { if(userNamePassword != null) { conn.setRequestProperty("Authorization", "Basic " + Base64.encode(userNamePassword)); //$NON-NLS-1$ //$NON-NLS-2$ } - conn.setRequestProperty("User-Agent", "OsmAnd"); //$NON-NLS-1$ //$NON-NLS-2$ + conn.setRequestProperty("User-Agent", "OsmAnd"); //$NON-NLS-1$ //$NON-NLS-2$ log.info("Response code and message : " + conn.getResponseCode() + " " + conn.getResponseMessage()); if(conn.getResponseCode() != 200){ return conn.getResponseMessage(); @@ -57,7 +57,7 @@ public class NetworkUtils { } } - public static String sendPostDataRequest(String urlText, InputStream data) { + public static String sendPostDataRequest(String urlText, String formName, String fileName, InputStream data) { try { log.info("POST : " + urlText); HttpURLConnection conn = getHttpURLConnection(urlText); @@ -69,7 +69,7 @@ public class NetworkUtils { conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY); OutputStream ous = conn.getOutputStream(); ous.write(("--" + BOUNDARY + "\r\n").getBytes()); - ous.write(("content-disposition: form-data; name=\"" + "file" + "\"; filename=\"" + "image1" + "\"\r\n").getBytes()); //$NON-NLS-1$ //$NON-NLS-2$ + ous.write(("Content-Disposition: form-data; name=\"" + formName + "\"; filename=\"" + fileName + "\"\r\n").getBytes()); //$NON-NLS-1$ //$NON-NLS-2$ ous.write(("Content-Type: application/octet-stream\r\n\r\n").getBytes()); //$NON-NLS-1$ Algorithms.streamCopy(data, ous); ous.write(("\r\n--" + BOUNDARY + "--\r\n").getBytes()); //$NON-NLS-1$ //$NON-NLS-2$ @@ -146,9 +146,9 @@ public class NetworkUtils { conn.setRequestProperty("Authorization", "Basic " + Base64.encode(userNamePassword)); //$NON-NLS-1$ //$NON-NLS-2$ } } - conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY); //$NON-NLS-1$ //$NON-NLS-2$ - conn.setRequestProperty("User-Agent", "OsmAnd"); //$NON-NLS-1$ //$NON-NLS-2$ - OutputStream ous = conn.getOutputStream(); + conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY); //$NON-NLS-1$ //$NON-NLS-2$ + conn.setRequestProperty("User-Agent", "OsmAnd"); //$NON-NLS-1$ //$NON-NLS-2$ + OutputStream ous = conn.getOutputStream(); ous.write(("--" + BOUNDARY + "\r\n").getBytes()); String filename = fileToUpload.getName(); if (gzip) { diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java index 6bb4da1ce5..26d984b2da 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java @@ -1222,7 +1222,7 @@ public class RouteResultPreparation { // 3. calculate angle difference // This method doesn't work if you go from S to N touching only 1 point of roundabout, // but it is very important to identify very sharp or very large angle to understand did you pass whole roundabout or small entrance - float turnAngleBasedOnCircle = (float) MapUtils.degreesDiff(firstRoundabout.getBearingBegin(), lastRoundabout.getBearingEnd() + 180); + float turnAngleBasedOnCircle = (float) -MapUtils.degreesDiff(firstRoundabout.getBearingBegin(), lastRoundabout.getBearingEnd() + 180); if (Math.abs(turnAngleBasedOnOutRoads) > 120) { // correctly identify if angle is +- 180, so we approach from left or right side t.setTurnAngle(turnAngleBasedOnCircle) ; diff --git a/OsmAnd/no_translate.xml b/OsmAnd/no_translate.xml index d8e4108d4a..92d3a4034f 100644 --- a/OsmAnd/no_translate.xml +++ b/OsmAnd/no_translate.xml @@ -41,6 +41,7 @@ OsmAnd Unlimited Markers https://test.openplacereviews.org/ + https://test.openplacereviews.org/ v8G8r9NLJZGMV4he5lwbQlz620FNVARKjI9Bm5UJ jDvM95Ne1Bq2BDTmIfB6b3ZMxvdK87WGfp6DC07J Ti2qq3fo4i4Wmuox3SiWRIGq3obZisBHnxmcM05y diff --git a/OsmAnd/res/drawable/btn_border_active.xml b/OsmAnd/res/drawable/btn_border_active.xml new file mode 100644 index 0000000000..1295891265 --- /dev/null +++ b/OsmAnd/res/drawable/btn_border_active.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/ic_action_user_account_16.xml b/OsmAnd/res/drawable/ic_action_user_account_16.xml new file mode 100644 index 0000000000..f05533e018 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_user_account_16.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/OsmAnd/res/drawable/seekbar_progress_announcement_time.xml b/OsmAnd/res/drawable/seekbar_progress_announcement_time.xml index 84e6587248..794539923e 100644 --- a/OsmAnd/res/drawable/seekbar_progress_announcement_time.xml +++ b/OsmAnd/res/drawable/seekbar_progress_announcement_time.xml @@ -1,19 +1,15 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/drawable/seekbar_thumb_announcement_time.xml b/OsmAnd/res/drawable/seekbar_thumb_announcement_time.xml index 718b10c081..a126aee222 100644 --- a/OsmAnd/res/drawable/seekbar_thumb_announcement_time.xml +++ b/OsmAnd/res/drawable/seekbar_thumb_announcement_time.xml @@ -1,12 +1,13 @@ + - - - - - - + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/bottom_sheet_announcement_time.xml b/OsmAnd/res/layout/bottom_sheet_announcement_time.xml index 682cde0a66..246ffe3476 100644 --- a/OsmAnd/res/layout/bottom_sheet_announcement_time.xml +++ b/OsmAnd/res/layout/bottom_sheet_announcement_time.xml @@ -27,6 +27,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/content_padding" android:layout_marginLeft="@dimen/content_padding" + android:layout_marginTop="@dimen/content_padding_half" android:layout_marginEnd="@dimen/content_padding" android:layout_marginRight="@dimen/content_padding" android:lineSpacingMultiplier="1.1" @@ -70,8 +71,6 @@ android:maxHeight="2dp" android:paddingTop="11dp" android:paddingBottom="11dp" - android:progressDrawable="@drawable/seekbar_progress_announcement_time" - android:thumb="@drawable/seekbar_thumb_announcement_time" osmand:tickMark="@drawable/seekbar_tickmark_announcement_time" tools:max="3" tools:progress="1" /> diff --git a/OsmAnd/res/layout/dialog_edit_gpx_description.xml b/OsmAnd/res/layout/dialog_edit_gpx_description.xml new file mode 100644 index 0000000000..52b5f97bdc --- /dev/null +++ b/OsmAnd/res/layout/dialog_edit_gpx_description.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/dialog_read_gpx_description.xml b/OsmAnd/res/layout/dialog_read_gpx_description.xml new file mode 100644 index 0000000000..f4cf390af5 --- /dev/null +++ b/OsmAnd/res/layout/dialog_read_gpx_description.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/gpx_description_preview_card.xml b/OsmAnd/res/layout/gpx_description_preview_card.xml new file mode 100644 index 0000000000..d51c5a846e --- /dev/null +++ b/OsmAnd/res/layout/gpx_description_preview_card.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/gpx_item_altitude.xml b/OsmAnd/res/layout/gpx_item_altitude.xml index af46a440a4..9dd2037878 100644 --- a/OsmAnd/res/layout/gpx_item_altitude.xml +++ b/OsmAnd/res/layout/gpx_item_altitude.xml @@ -1,368 +1,321 @@ + 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"> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_item_general.xml b/OsmAnd/res/layout/gpx_item_general.xml index d0f23f6a38..962bbbe9f5 100644 --- a/OsmAnd/res/layout/gpx_item_general.xml +++ b/OsmAnd/res/layout/gpx_item_general.xml @@ -1,386 +1,339 @@ + 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"> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_item_speed.xml b/OsmAnd/res/layout/gpx_item_speed.xml index 0c98402703..d5bc1d3edb 100644 --- a/OsmAnd/res/layout/gpx_item_speed.xml +++ b/OsmAnd/res/layout/gpx_item_speed.xml @@ -1,368 +1,323 @@ + 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"> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_overview_fragment.xml b/OsmAnd/res/layout/gpx_overview_fragment.xml new file mode 100644 index 0000000000..0acb712fc6 --- /dev/null +++ b/OsmAnd/res/layout/gpx_overview_fragment.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/item_gpx_action.xml b/OsmAnd/res/layout/item_gpx_action.xml new file mode 100644 index 0000000000..dce94e951b --- /dev/null +++ b/OsmAnd/res/layout/item_gpx_action.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/item_gpx_stat_block.xml b/OsmAnd/res/layout/item_gpx_stat_block.xml new file mode 100644 index 0000000000..fcb3e604cb --- /dev/null +++ b/OsmAnd/res/layout/item_gpx_stat_block.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/online_routing_engine_fragment.xml b/OsmAnd/res/layout/online_routing_engine_fragment.xml index 69cc042252..98b3317f66 100644 --- a/OsmAnd/res/layout/online_routing_engine_fragment.xml +++ b/OsmAnd/res/layout/online_routing_engine_fragment.xml @@ -1,9 +1,8 @@ - + android:background="?attr/list_background_color"> + android:layout_height="match_parent" + android:layout_marginBottom="@dimen/dialog_button_ex_height"> + android:orientation="vertical" + android:paddingTop="@dimen/dialog_button_ex_height" + android:paddingBottom="@dimen/context_menu_buttons_bottom_height" /> - + android:layout_height="wrap_content" + android:layout_gravity="bottom" + android:orientation="vertical"> - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/layout/online_routing_preference_segment.xml b/OsmAnd/res/layout/online_routing_preference_segment.xml index 437ba875e5..3e5373aa6a 100644 --- a/OsmAnd/res/layout/online_routing_preference_segment.xml +++ b/OsmAnd/res/layout/online_routing_preference_segment.xml @@ -164,36 +164,4 @@ tools:visibility="visible" android:visibility="gone" /> - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/search_text_layout.xml b/OsmAnd/res/layout/search_text_layout.xml index 3056aec3df..f9365d7f75 100644 --- a/OsmAnd/res/layout/search_text_layout.xml +++ b/OsmAnd/res/layout/search_text_layout.xml @@ -1,6 +1,7 @@ + android:paddingRight="@dimen/context_menu_padding_margin_default" + android:paddingBottom="@dimen/context_menu_direction_margin"> @@ -79,7 +81,7 @@ android:id="@+id/icon_view" android:layout_width="@dimen/map_widget_icon" android:layout_height="@dimen/map_widget_icon" - android:layout_marginTop="@dimen/context_menu_padding_margin_default" + android:layout_marginTop="@dimen/context_menu_second_line_top_margin" android:tint="?attr/default_icon_color" osmand:srcCompat="@drawable/ic_action_polygom_dark" /> @@ -116,6 +118,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd/res/menu/edit_description_menu.xml b/OsmAnd/res/menu/edit_description_menu.xml new file mode 100644 index 0000000000..1d4e64be98 --- /dev/null +++ b/OsmAnd/res/menu/edit_description_menu.xml @@ -0,0 +1,8 @@ + + + + diff --git a/OsmAnd/res/menu/track_menu_bottom_navigation.xml b/OsmAnd/res/menu/track_menu_bottom_navigation.xml index fa07fb12a4..943f8c44ba 100644 --- a/OsmAnd/res/menu/track_menu_bottom_navigation.xml +++ b/OsmAnd/res/menu/track_menu_bottom_navigation.xml @@ -1,14 +1,16 @@ - - - - + + + + + \ No newline at end of file diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index caf08aef6a..c745589ef7 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -141,6 +141,7 @@ + diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 788849dad0..17b80d363e 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -274,6 +274,7 @@ #197d2a #b3b3b3 + #87CC70 #fafafa #101821 diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 6f7ea33539..79d3a211b4 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -12,6 +12,12 @@ --> + Copy to favorites + Copy to map markers + Delete waypoints + Edit description + Read full + Delete this online routing engine? The name is already exists Server error: %1$s MTB diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index a7cbb98fda..5c074185ef 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -248,6 +248,7 @@ @style/RadioButtonStyle @color/text_input_background_light @drawable/img_help_announcement_time_day + @color/switch_button_active_light