Merge branch 'android_http_server' of https://github.com/osmandapp/Osmand into android_http_server

This commit is contained in:
simon 2020-09-07 09:34:12 +03:00
commit 8dd5bda3fc
63 changed files with 694 additions and 510 deletions

View file

@ -1,7 +1,5 @@
package net.osmand.router;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXExtensionsWriter;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.RouteSegment;
import net.osmand.GPXUtilities.RouteType;
@ -12,12 +10,8 @@ import net.osmand.Location;
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule;
import net.osmand.binary.RouteDataBundle;
import net.osmand.binary.StringBundle;
import net.osmand.binary.StringBundleWriter;
import net.osmand.binary.StringBundleXmlWriter;
import net.osmand.util.Algorithms;
import org.xmlpull.v1.XmlSerializer;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_color_primary_dark">
<item>
<shape>
<solid android:color="@color/switch_button_active_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_dark" />
</shape>
</item>
<item
android:id="@android:id/mask"
android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
</ripple>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/active_color_primary_light">
<item>
<shape>
<solid android:color="@color/switch_button_active_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_light" />
</shape>
</item>
<item
android:id="@android:id/mask"
android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
</ripple>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,33 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="172dp"
android:height="36dp"
android:viewportWidth="172"
android:viewportHeight="36">
<group>
<clip-path android:pathData="M0,0h172v36h-172z M 0,0"/>
<path
android:pathData="M15.4629 34.252C13.2509 34.252 11.2349 33.818 9.41489 32.95C7.59489 32.082 6.0409 30.948 4.7529 29.548C3.4649 28.12 2.4569 26.496 1.7289 24.676C1.0289 22.856 0.678894 20.98 0.678894 19.048C0.678894 17.088 1.0429 15.198 1.7709 13.378C2.5269 11.558 3.56289 9.96203 4.87889 8.59003C6.2229 7.19003 7.8049 6.08403 9.6249 5.27203C11.4449 4.43203 13.4329 4.01203 15.5889 4.01203C17.8009 4.01203 19.8169 4.44603 21.6369 5.31403C23.4569 6.18203 25.0109 7.33003 26.2989 8.75803C27.5869 10.186 28.5809 11.81 29.2809 13.63C29.9809 15.45 30.3309 17.298 30.3309 19.174C30.3309 21.134 29.9529 23.024 29.1969 24.844C28.4689 26.664 27.4469 28.274 26.1309 29.674C24.8149 31.046 23.2469 32.152 21.4269 32.992C19.6069 33.832 17.6189 34.252 15.4629 34.252ZM7.69289 19.132C7.69289 20.28 7.8609 21.4 8.1969 22.492C8.5329 23.556 9.0229 24.508 9.6669 25.348C10.3389 26.188 11.1649 26.86 12.1449 27.364C13.1249 27.868 14.2449 28.12 15.5049 28.12C16.8209 28.12 17.9689 27.854 18.9489 27.322C19.9289 26.79 20.7409 26.104 21.3849 25.264C22.0289 24.396 22.5049 23.43 22.8129 22.366C23.1489 21.274 23.3169 20.168 23.3169 19.048C23.3169 17.9 23.1489 16.794 22.8129 15.73C22.4769 14.638 21.9729 13.686 21.3009 12.874C20.6289 12.034 19.8029 11.376 18.8229 10.9C17.8709 10.396 16.7649 10.144 15.5049 10.144C14.1889 10.144 13.0409 10.41 12.0609 10.942C11.1089 11.446 10.2969 12.118 9.6249 12.958C8.9809 13.798 8.4909 14.764 8.1549 15.856C7.8469 16.92 7.69289 18.012 7.69289 19.132Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M42.459 34.42C40.583 34.42 38.7351 34.126 36.9151 33.538C35.0951 32.922 33.555 32.04 32.295 30.892L34.6891 26.776C36.0331 27.7 37.3351 28.414 38.5951 28.918C39.8831 29.422 41.115 29.674 42.291 29.674C43.159 29.674 43.831 29.52 44.307 29.212C44.783 28.904 45.0211 28.456 45.0211 27.868C45.0211 27.28 44.713 26.818 44.097 26.482C43.509 26.118 42.459 25.74 40.947 25.348C39.463 24.928 38.203 24.522 37.167 24.13C36.159 23.738 35.3331 23.304 34.6891 22.828C34.0451 22.352 33.5831 21.806 33.3031 21.19C33.0231 20.574 32.8831 19.846 32.8831 19.006C32.8831 17.886 33.107 16.864 33.555 15.94C34.003 15.016 34.619 14.232 35.403 13.588C36.187 12.944 37.1111 12.44 38.1751 12.076C39.2671 11.712 40.4431 11.53 41.7031 11.53C43.3551 11.53 44.8951 11.754 46.3231 12.202C47.7791 12.65 49.1791 13.462 50.5231 14.638L47.9191 18.67C46.6591 17.802 45.5391 17.172 44.5591 16.78C43.5791 16.388 42.6271 16.192 41.7031 16.192C40.9751 16.192 40.3591 16.346 39.8551 16.654C39.3511 16.934 39.099 17.396 39.099 18.04C39.099 18.656 39.3651 19.118 39.8971 19.426C40.4571 19.734 41.4791 20.07 42.9631 20.434C44.5311 20.854 45.8471 21.274 46.9111 21.694C48.0031 22.114 48.885 22.59 49.557 23.122C50.229 23.626 50.719 24.214 51.0271 24.886C51.3351 25.558 51.4891 26.356 51.4891 27.28C51.4891 29.464 50.6771 31.2 49.0531 32.488C47.4291 33.776 45.231 34.42 42.459 34.42Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M89.584 34H82.864V21.61C82.864 20.154 82.598 19.104 82.066 18.46C81.534 17.788 80.848 17.452 80.008 17.452C79.56 17.452 79.098 17.55 78.622 17.746C78.174 17.942 77.754 18.222 77.362 18.586C76.97 18.922 76.606 19.328 76.27 19.804C75.962 20.28 75.71 20.798 75.514 21.358V34H68.794V21.61C68.794 20.154 68.528 19.104 67.996 18.46C67.464 17.788 66.778 17.452 65.938 17.452C65.042 17.452 64.16 17.816 63.292 18.544C62.452 19.244 61.836 20.182 61.444 21.358V34H54.724V11.95H60.772V15.646C61.584 14.302 62.676 13.28 64.048 12.58C65.448 11.88 67.072 11.53 68.92 11.53C69.844 11.53 70.642 11.642 71.314 11.866C72.014 12.09 72.616 12.398 73.12 12.79C73.624 13.182 74.03 13.644 74.338 14.176C74.646 14.68 74.87 15.226 75.01 15.814C75.85 14.442 76.956 13.392 78.328 12.664C79.7 11.908 81.268 11.53 83.032 11.53C84.432 11.53 85.552 11.796 86.392 12.328C87.26 12.832 87.932 13.504 88.408 14.344C88.884 15.156 89.192 16.052 89.332 17.032C89.5 18.012 89.584 18.964 89.584 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M102.628 4.18003H108.844L119.722 34H112.666L110.356 27.322H101.074L98.806 34H91.75L102.628 4.18003ZM109.222 22.576L105.736 12.034L102.166 22.576H109.222Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M143.365 34H136.645V21.61C136.645 20.154 136.365 19.104 135.805 18.46C135.273 17.788 134.559 17.452 133.663 17.452C133.187 17.452 132.711 17.55 132.235 17.746C131.759 17.942 131.297 18.222 130.849 18.586C130.401 18.922 129.995 19.328 129.631 19.804C129.295 20.28 129.029 20.798 128.833 21.358V34H122.113V11.95H128.161V15.646C128.973 14.33 130.121 13.322 131.605 12.622C133.089 11.894 134.797 11.53 136.729 11.53C138.157 11.53 139.305 11.796 140.173 12.328C141.041 12.832 141.713 13.504 142.189 14.344C142.665 15.156 142.973 16.052 143.113 17.032C143.281 18.012 143.365 18.964 143.365 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M156.986 34.42C155.474 34.42 154.074 34.14 152.786 33.58C151.526 32.992 150.434 32.18 149.51 31.144C148.586 30.108 147.858 28.904 147.326 27.532C146.822 26.132 146.57 24.606 146.57 22.954C146.57 21.358 146.808 19.86 147.284 18.46C147.76 17.06 148.431 15.856 149.299 14.848C150.167 13.812 151.189 13 152.365 12.412C153.569 11.824 154.886 11.53 156.314 11.53C157.854 11.53 159.239 11.894 160.471 12.622C161.731 13.35 162.698 14.33 163.37 15.562V3.34003H170.09V26.44C170.09 27.112 170.188 27.588 170.383 27.868C170.607 28.12 170.986 28.274 171.518 28.33V34C170.902 34.14 170.37 34.224 169.922 34.252C169.474 34.308 169.053 34.336 168.661 34.336C167.485 34.336 166.533 34.098 165.805 33.622C165.077 33.118 164.658 32.404 164.546 31.48L164.419 30.346C163.635 31.718 162.572 32.74 161.228 33.412C159.912 34.084 158.498 34.42 156.986 34.42ZM158.792 28.75C159.716 28.75 160.597 28.484 161.438 27.952C162.306 27.392 162.963 26.636 163.411 25.684V21.064C162.991 19.944 162.306 19.034 161.354 18.334C160.43 17.606 159.464 17.242 158.456 17.242C157.728 17.242 157.055 17.41 156.439 17.746C155.851 18.054 155.333 18.474 154.885 19.006C154.437 19.538 154.087 20.154 153.835 20.854C153.611 21.554 153.499 22.296 153.499 23.08C153.499 23.892 153.626 24.648 153.878 25.348C154.158 26.048 154.521 26.65 154.969 27.154C155.445 27.658 156.006 28.05 156.65 28.33C157.322 28.61 158.036 28.75 158.792 28.75Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
</group>
</vector>

View file

@ -0,0 +1,45 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="172dp"
android:height="72dp"
android:viewportWidth="172"
android:viewportHeight="72">
<group>
<clip-path android:pathData="M0,0h172v72h-172z M 0,0"/>
<path
android:pathData="M152.786 33.58C154.074 34.14 155.474 34.42 156.986 34.42C158.497 34.42 159.912 34.084 161.228 33.412C162.572 32.74 163.635 31.718 164.419 30.346L164.546 31.48C164.658 32.404 165.077 33.118 165.805 33.622C166.533 34.098 167.486 34.336 168.661 34.336C169.053 34.336 169.474 34.308 169.922 34.252C170.37 34.224 170.902 34.14 171.518 34V28.33C170.986 28.274 170.607 28.12 170.383 27.868C170.188 27.588 170.09 27.112 170.09 26.44V3.34003H163.37V15.562C162.698 14.33 161.731 13.35 160.471 12.622C159.24 11.894 157.854 11.53 156.314 11.53C154.886 11.53 153.569 11.824 152.365 12.412C151.189 13 150.167 13.812 149.299 14.848C148.432 15.856 147.76 17.06 147.284 18.46C146.808 19.86 146.57 21.358 146.57 22.954C146.57 24.606 146.822 26.132 147.326 27.532C147.857 28.904 148.586 30.108 149.51 31.144C150.434 32.18 151.526 32.992 152.786 33.58ZM161.438 27.952C160.598 28.484 159.715 28.75 158.792 28.75C158.036 28.75 157.322 28.61 156.65 28.33C156.006 28.05 155.445 27.658 154.969 27.154C154.521 26.65 154.158 26.048 153.878 25.348C153.626 24.648 153.499 23.892 153.499 23.08C153.499 22.296 153.611 21.554 153.835 20.854C154.087 20.154 154.438 19.538 154.885 19.006C155.333 18.474 155.852 18.054 156.439 17.746C157.055 17.41 157.728 17.242 158.456 17.242C159.464 17.242 160.43 17.606 161.354 18.334C162.305 19.034 162.992 19.944 163.411 21.064V25.684C162.964 26.636 162.305 27.392 161.438 27.952Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M9.41489 32.95C11.2349 33.818 13.2509 34.252 15.4629 34.252C17.6189 34.252 19.6069 33.832 21.4269 32.992C23.2469 32.152 24.8149 31.046 26.1309 29.674C27.4469 28.274 28.4689 26.664 29.1969 24.844C29.9529 23.024 30.3309 21.134 30.3309 19.174C30.3309 17.298 29.9809 15.45 29.2809 13.63C28.5809 11.81 27.5869 10.186 26.2989 8.75803C25.0109 7.33003 23.4569 6.18203 21.6369 5.31403C19.8169 4.44603 17.8009 4.01203 15.5889 4.01203C13.4329 4.01203 11.4449 4.43203 9.6249 5.27203C7.8049 6.08403 6.2229 7.19003 4.87889 8.59003C3.56289 9.96203 2.5269 11.558 1.7709 13.378C1.0429 15.198 0.678894 17.088 0.678894 19.048C0.678894 20.98 1.0289 22.856 1.7289 24.676C2.4569 26.496 3.4649 28.12 4.7529 29.548C6.0409 30.948 7.59489 32.082 9.41489 32.95ZM8.1969 22.492C7.8609 21.4 7.69289 20.28 7.69289 19.132C7.69289 18.012 7.8469 16.92 8.1549 15.856C8.4909 14.764 8.9809 13.798 9.6249 12.958C10.2969 12.118 11.1089 11.446 12.0609 10.942C13.0409 10.41 14.1889 10.144 15.5049 10.144C16.7649 10.144 17.8709 10.396 18.8229 10.9C19.8029 11.376 20.6289 12.034 21.3009 12.874C21.9729 13.686 22.4769 14.638 22.8129 15.73C23.1489 16.794 23.3169 17.9 23.3169 19.048C23.3169 20.168 23.1489 21.274 22.8129 22.366C22.5049 23.43 22.0289 24.396 21.3849 25.264C20.7409 26.104 19.9289 26.79 18.9489 27.322C17.9689 27.854 16.8209 28.12 15.5049 28.12C14.2449 28.12 13.1249 27.868 12.1449 27.364C11.1649 26.86 10.3389 26.188 9.6669 25.348C9.0229 24.508 8.5329 23.556 8.1969 22.492Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M36.9151 33.538C38.7351 34.126 40.583 34.42 42.459 34.42C45.231 34.42 47.4291 33.776 49.0531 32.488C50.6771 31.2 51.4891 29.464 51.4891 27.28C51.4891 26.356 51.335 25.558 51.0271 24.886C50.7191 24.214 50.229 23.626 49.557 23.122C48.885 22.59 48.0031 22.114 46.9111 21.694C45.8471 21.274 44.5311 20.854 42.9631 20.434C41.4791 20.07 40.4571 19.734 39.8971 19.426C39.3651 19.118 39.099 18.656 39.099 18.04C39.099 17.396 39.3511 16.934 39.8551 16.654C40.3591 16.346 40.9751 16.192 41.7031 16.192C42.6271 16.192 43.5791 16.388 44.5591 16.78C45.5391 17.172 46.6591 17.802 47.9191 18.67L50.5231 14.638C49.1791 13.462 47.7791 12.65 46.3231 12.202C44.8951 11.754 43.3551 11.53 41.7031 11.53C40.4431 11.53 39.2671 11.712 38.1751 12.076C37.1111 12.44 36.187 12.944 35.403 13.588C34.619 14.232 34.0031 15.016 33.555 15.94C33.107 16.864 32.8831 17.886 32.8831 19.006C32.8831 19.846 33.0231 20.574 33.3031 21.19C33.583 21.806 34.0451 22.352 34.6891 22.828C35.3331 23.304 36.159 23.738 37.167 24.13C38.203 24.522 39.463 24.928 40.947 25.348C42.459 25.74 43.509 26.118 44.097 26.482C44.7131 26.818 45.0211 27.28 45.0211 27.868C45.0211 28.456 44.783 28.904 44.307 29.212C43.831 29.52 43.159 29.674 42.291 29.674C41.1151 29.674 39.883 29.422 38.5951 28.918C37.3351 28.414 36.0331 27.7 34.6891 26.776L32.295 30.892C33.555 32.04 35.0951 32.922 36.9151 33.538Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M89.584 34H82.864V21.61C82.864 20.154 82.598 19.104 82.066 18.46C81.534 17.788 80.848 17.452 80.008 17.452C79.56 17.452 79.098 17.55 78.622 17.746C78.174 17.942 77.754 18.222 77.362 18.586C76.97 18.922 76.606 19.328 76.27 19.804C75.962 20.28 75.71 20.798 75.514 21.358V34H68.794V21.61C68.794 20.154 68.528 19.104 67.996 18.46C67.464 17.788 66.778 17.452 65.938 17.452C65.042 17.452 64.16 17.816 63.292 18.544C62.452 19.244 61.836 20.182 61.444 21.358V34H54.724V11.95H60.772V15.646C61.584 14.302 62.676 13.28 64.048 12.58C65.448 11.88 67.072 11.53 68.92 11.53C69.844 11.53 70.642 11.642 71.314 11.866C72.014 12.09 72.616 12.398 73.12 12.79C73.624 13.182 74.03 13.644 74.338 14.176C74.646 14.68 74.87 15.226 75.01 15.814C75.85 14.442 76.956 13.392 78.328 12.664C79.7 11.908 81.268 11.53 83.032 11.53C84.432 11.53 85.552 11.796 86.392 12.328C87.26 12.832 87.932 13.504 88.408 14.344C88.884 15.156 89.192 16.052 89.332 17.032C89.5 18.012 89.584 18.964 89.584 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M108.844 4.18003H102.628L91.75 34H98.806L101.074 27.322H110.356L112.666 34H119.722L108.844 4.18003ZM105.736 12.034L109.222 22.576H102.166L105.736 12.034Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M143.365 34H136.645V21.61C136.645 20.154 136.365 19.104 135.805 18.46C135.273 17.788 134.559 17.452 133.663 17.452C133.187 17.452 132.711 17.55 132.235 17.746C131.759 17.942 131.297 18.222 130.849 18.586C130.401 18.922 129.995 19.328 129.631 19.804C129.295 20.28 129.029 20.798 128.833 21.358V34H122.113V11.95H128.161V15.646C128.973 14.33 130.121 13.322 131.605 12.622C133.089 11.894 134.797 11.53 136.729 11.53C138.157 11.53 139.305 11.796 140.173 12.328C141.041 12.832 141.713 13.504 142.189 14.344C142.665 15.156 142.973 16.052 143.113 17.032C143.281 18.012 143.365 18.964 143.365 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M159.895 59.016C159.895 58.6333 159.843 58.2833 159.741 57.966C159.638 57.6487 159.489 57.378 159.293 57.154C159.106 56.93 158.873 56.7573 158.593 56.636C158.313 56.5053 158 56.44 157.655 56.44H156.563V61.62H157.655C158.009 61.62 158.327 61.5547 158.607 61.424C158.887 61.2933 159.12 61.1113 159.307 60.878C159.503 60.6447 159.647 60.3693 159.741 60.052C159.843 59.7347 159.895 59.3893 159.895 59.016Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M68 49C68 47.8954 68.8954 47 70 47H169C170.105 47 171 47.8954 171 49V69C171 70.1046 170.105 71 169 71H70C68.8954 71 68 70.1046 68 69V49ZM82.9503 61.452C82.7263 61.592 82.4557 61.662 82.1383 61.662C81.821 61.662 81.5503 61.5967 81.3263 61.466C81.1117 61.326 80.9343 61.144 80.7943 60.92C80.6543 60.6867 80.5517 60.4207 80.4863 60.122C80.421 59.814 80.3883 59.4967 80.3883 59.17V54.06H77.6583V59.17C77.6583 59.8327 77.7423 60.4627 77.9103 61.06C78.0783 61.648 78.3443 62.166 78.7083 62.614C79.0723 63.062 79.5343 63.4213 80.0943 63.692C80.6637 63.9533 81.345 64.084 82.1383 64.084C82.9037 64.084 83.5663 63.958 84.1263 63.706C84.6957 63.454 85.167 63.1087 85.5403 62.67C85.9137 62.2313 86.189 61.7133 86.3663 61.116C86.5437 60.5093 86.6323 59.8607 86.6323 59.17V54.06H83.9023V59.17C83.9023 59.4967 83.8697 59.8093 83.8043 60.108C83.739 60.4067 83.6363 60.6727 83.4963 60.906C83.3563 61.13 83.1743 61.312 82.9503 61.452ZM92.0526 64V59.114L96.0006 64H98.1706V54.06H95.4406V59.114L91.4506 54.06H89.3226V64H92.0526ZM100.997 64V54.06H103.727V61.62H108.235V64H100.997ZM110.307 54.06V64H113.037V54.06H110.307ZM123.388 64V58.764L121.722 62.446H120.266L118.6 58.764V64H115.87V54.06H118.852L120.994 58.736L123.15 54.06H126.118V64H123.388ZM128.939 54.06V64H131.669V54.06H128.939ZM142.245 56.44H139.389V64H136.659V56.44H133.789V54.06H142.245V56.44ZM151.443 64V61.62H147.089V60.052H150.701V57.84H147.089V56.44H151.317V54.06H144.359V64H151.443ZM153.833 64V54.06H157.655C158.476 54.06 159.199 54.1907 159.825 54.452C160.45 54.7133 160.973 55.068 161.393 55.516C161.813 55.964 162.13 56.4913 162.345 57.098C162.559 57.6953 162.667 58.3347 162.667 59.016C162.667 59.772 162.545 60.458 162.303 61.074C162.069 61.6807 161.733 62.2033 161.295 62.642C160.856 63.0713 160.329 63.4073 159.713 63.65C159.097 63.8833 158.411 64 157.655 64H153.833Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
</group>
</vector>

View file

@ -0,0 +1,53 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="172dp"
android:height="72dp"
android:viewportWidth="172"
android:viewportHeight="72">
<group>
<clip-path android:pathData="M0,0h172v72h-172z M 0,0"/>
<path
android:pathData="M152.786 33.58C154.074 34.14 155.474 34.42 156.986 34.42C158.497 34.42 159.912 34.084 161.228 33.412C162.572 32.74 163.635 31.718 164.419 30.346L164.546 31.48C164.658 32.404 165.077 33.118 165.805 33.622C166.533 34.098 167.486 34.336 168.661 34.336C169.053 34.336 169.474 34.308 169.922 34.252C170.37 34.224 170.902 34.14 171.518 34V28.33C170.986 28.274 170.607 28.12 170.383 27.868C170.188 27.588 170.09 27.112 170.09 26.44V3.34003H163.37V15.562C162.698 14.33 161.731 13.35 160.471 12.622C159.24 11.894 157.854 11.53 156.314 11.53C154.886 11.53 153.569 11.824 152.365 12.412C151.189 13 150.167 13.812 149.299 14.848C148.432 15.856 147.76 17.06 147.284 18.46C146.808 19.86 146.57 21.358 146.57 22.954C146.57 24.606 146.822 26.132 147.326 27.532C147.857 28.904 148.586 30.108 149.51 31.144C150.434 32.18 151.526 32.992 152.786 33.58ZM161.438 27.952C160.598 28.484 159.715 28.75 158.792 28.75C158.036 28.75 157.322 28.61 156.65 28.33C156.006 28.05 155.445 27.658 154.969 27.154C154.521 26.65 154.158 26.048 153.878 25.348C153.626 24.648 153.499 23.892 153.499 23.08C153.499 22.296 153.611 21.554 153.835 20.854C154.087 20.154 154.438 19.538 154.885 19.006C155.333 18.474 155.852 18.054 156.439 17.746C157.055 17.41 157.728 17.242 158.456 17.242C159.464 17.242 160.43 17.606 161.354 18.334C162.305 19.034 162.992 19.944 163.411 21.064V25.684C162.964 26.636 162.305 27.392 161.438 27.952Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M9.41489 32.95C11.2349 33.818 13.2509 34.252 15.4629 34.252C17.6189 34.252 19.6069 33.832 21.4269 32.992C23.2469 32.152 24.8149 31.046 26.1309 29.674C27.4469 28.274 28.4689 26.664 29.1969 24.844C29.9529 23.024 30.3309 21.134 30.3309 19.174C30.3309 17.298 29.9809 15.45 29.2809 13.63C28.5809 11.81 27.5869 10.186 26.2989 8.75803C25.0109 7.33003 23.4569 6.18203 21.6369 5.31403C19.8169 4.44603 17.8009 4.01203 15.5889 4.01203C13.4329 4.01203 11.4449 4.43203 9.6249 5.27203C7.8049 6.08403 6.2229 7.19003 4.87889 8.59003C3.56289 9.96203 2.5269 11.558 1.7709 13.378C1.0429 15.198 0.678894 17.088 0.678894 19.048C0.678894 20.98 1.0289 22.856 1.7289 24.676C2.4569 26.496 3.4649 28.12 4.7529 29.548C6.0409 30.948 7.59489 32.082 9.41489 32.95ZM8.1969 22.492C7.8609 21.4 7.69289 20.28 7.69289 19.132C7.69289 18.012 7.8469 16.92 8.1549 15.856C8.4909 14.764 8.9809 13.798 9.6249 12.958C10.2969 12.118 11.1089 11.446 12.0609 10.942C13.0409 10.41 14.1889 10.144 15.5049 10.144C16.7649 10.144 17.8709 10.396 18.8229 10.9C19.8029 11.376 20.6289 12.034 21.3009 12.874C21.9729 13.686 22.4769 14.638 22.8129 15.73C23.1489 16.794 23.3169 17.9 23.3169 19.048C23.3169 20.168 23.1489 21.274 22.8129 22.366C22.5049 23.43 22.0289 24.396 21.3849 25.264C20.7409 26.104 19.9289 26.79 18.9489 27.322C17.9689 27.854 16.8209 28.12 15.5049 28.12C14.2449 28.12 13.1249 27.868 12.1449 27.364C11.1649 26.86 10.3389 26.188 9.6669 25.348C9.0229 24.508 8.5329 23.556 8.1969 22.492Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M36.9151 33.538C38.7351 34.126 40.583 34.42 42.459 34.42C45.231 34.42 47.4291 33.776 49.0531 32.488C50.6771 31.2 51.4891 29.464 51.4891 27.28C51.4891 26.356 51.335 25.558 51.0271 24.886C50.7191 24.214 50.229 23.626 49.557 23.122C48.885 22.59 48.0031 22.114 46.9111 21.694C45.8471 21.274 44.5311 20.854 42.9631 20.434C41.4791 20.07 40.4571 19.734 39.8971 19.426C39.3651 19.118 39.099 18.656 39.099 18.04C39.099 17.396 39.3511 16.934 39.8551 16.654C40.3591 16.346 40.9751 16.192 41.7031 16.192C42.6271 16.192 43.5791 16.388 44.5591 16.78C45.5391 17.172 46.6591 17.802 47.9191 18.67L50.5231 14.638C49.1791 13.462 47.7791 12.65 46.3231 12.202C44.8951 11.754 43.3551 11.53 41.7031 11.53C40.4431 11.53 39.2671 11.712 38.1751 12.076C37.1111 12.44 36.187 12.944 35.403 13.588C34.619 14.232 34.0031 15.016 33.555 15.94C33.107 16.864 32.8831 17.886 32.8831 19.006C32.8831 19.846 33.0231 20.574 33.3031 21.19C33.583 21.806 34.0451 22.352 34.6891 22.828C35.3331 23.304 36.159 23.738 37.167 24.13C38.203 24.522 39.463 24.928 40.947 25.348C42.459 25.74 43.509 26.118 44.097 26.482C44.7131 26.818 45.0211 27.28 45.0211 27.868C45.0211 28.456 44.783 28.904 44.307 29.212C43.831 29.52 43.159 29.674 42.291 29.674C41.1151 29.674 39.883 29.422 38.5951 28.918C37.3351 28.414 36.0331 27.7 34.6891 26.776L32.295 30.892C33.555 32.04 35.0951 32.922 36.9151 33.538Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M89.584 34H82.864V21.61C82.864 20.154 82.598 19.104 82.066 18.46C81.534 17.788 80.848 17.452 80.008 17.452C79.56 17.452 79.098 17.55 78.622 17.746C78.174 17.942 77.754 18.222 77.362 18.586C76.97 18.922 76.606 19.328 76.27 19.804C75.962 20.28 75.71 20.798 75.514 21.358V34H68.794V21.61C68.794 20.154 68.528 19.104 67.996 18.46C67.464 17.788 66.778 17.452 65.938 17.452C65.042 17.452 64.16 17.816 63.292 18.544C62.452 19.244 61.836 20.182 61.444 21.358V34H54.724V11.95H60.772V15.646C61.584 14.302 62.676 13.28 64.048 12.58C65.448 11.88 67.072 11.53 68.92 11.53C69.844 11.53 70.642 11.642 71.314 11.866C72.014 12.09 72.616 12.398 73.12 12.79C73.624 13.182 74.03 13.644 74.338 14.176C74.646 14.68 74.87 15.226 75.01 15.814C75.85 14.442 76.956 13.392 78.328 12.664C79.7 11.908 81.268 11.53 83.032 11.53C84.432 11.53 85.552 11.796 86.392 12.328C87.26 12.832 87.932 13.504 88.408 14.344C88.884 15.156 89.192 16.052 89.332 17.032C89.5 18.012 89.584 18.964 89.584 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M108.844 4.18003H102.628L91.75 34H98.806L101.074 27.322H110.356L112.666 34H119.722L108.844 4.18003ZM105.736 12.034L109.222 22.576H102.166L105.736 12.034Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M143.365 34H136.645V21.61C136.645 20.154 136.365 19.104 135.805 18.46C135.273 17.788 134.559 17.452 133.663 17.452C133.187 17.452 132.711 17.55 132.235 17.746C131.759 17.942 131.297 18.222 130.849 18.586C130.401 18.922 129.995 19.328 129.631 19.804C129.295 20.28 129.029 20.798 128.833 21.358V34H122.113V11.95H128.161V15.646C128.973 14.33 130.121 13.322 131.605 12.622C133.089 11.894 134.797 11.53 136.729 11.53C138.157 11.53 139.305 11.796 140.173 12.328C141.041 12.832 141.713 13.504 142.189 14.344C142.665 15.156 142.973 16.052 143.113 17.032C143.281 18.012 143.365 18.964 143.365 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M60.08 59.044C60.08 59.38 60.1266 59.7067 60.22 60.024C60.3133 60.332 60.4533 60.6073 60.64 60.85C60.8267 61.0927 61.06 61.2887 61.34 61.438C61.6293 61.5873 61.97 61.662 62.362 61.662C62.754 61.662 63.0947 61.5873 63.384 61.438C63.6733 61.2793 63.9067 61.0787 64.084 60.836C64.2707 60.584 64.406 60.2993 64.49 59.982C64.5833 59.6647 64.63 59.3427 64.63 59.016C64.63 58.68 64.5833 58.358 64.49 58.05C64.3967 57.7327 64.252 57.4573 64.056 57.224C63.8693 56.9813 63.6313 56.79 63.342 56.65C63.062 56.5007 62.7307 56.426 62.348 56.426C61.956 56.426 61.6153 56.5007 61.326 56.65C61.046 56.7993 60.8126 57 60.626 57.252C60.4393 57.4947 60.2993 57.7747 60.206 58.092C60.122 58.4 60.08 58.7173 60.08 59.044Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M97.1309 60.234L96.2489 57.154L95.3249 60.234H97.1309Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M120.467 57.966C120.57 58.2833 120.621 58.6333 120.621 59.016C120.621 59.3893 120.57 59.7347 120.467 60.052C120.374 60.3693 120.229 60.6447 120.033 60.878C119.847 61.1113 119.613 61.2933 119.333 61.424C119.053 61.5547 118.736 61.62 118.381 61.62H117.289V56.44H118.381C118.727 56.44 119.039 56.5053 119.319 56.636C119.599 56.7573 119.833 56.93 120.019 57.154C120.215 57.378 120.365 57.6487 120.467 57.966Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M49 49C49 47.8954 49.8954 47 51 47H169C170.105 47 171 47.8954 171 49V69C171 70.1046 170.105 71 169 71H51C49.8954 71 49 70.1046 49 69V49ZM75.617 57.308C75.337 57.14 75.0477 56.9907 74.749 56.86C74.497 56.748 74.2124 56.6453 73.895 56.552C73.587 56.4493 73.2837 56.398 72.985 56.398C72.7424 56.398 72.5464 56.4353 72.397 56.51C72.257 56.5847 72.187 56.7107 72.187 56.888C72.187 57.0187 72.229 57.126 72.313 57.21C72.397 57.294 72.5184 57.3733 72.677 57.448C72.8357 57.5133 73.027 57.5787 73.251 57.644C73.4844 57.7093 73.7457 57.7887 74.035 57.882C74.4924 58.022 74.903 58.176 75.267 58.344C75.6404 58.512 75.9577 58.7127 76.219 58.946C76.4804 59.17 76.681 59.4453 76.821 59.772C76.961 60.0987 77.031 60.4953 77.031 60.962C77.031 61.5593 76.919 62.0633 76.695 62.474C76.4804 62.8753 76.191 63.1973 75.827 63.44C75.4724 63.6827 75.0664 63.86 74.609 63.972C74.161 64.0747 73.7084 64.126 73.251 64.126C72.887 64.126 72.5137 64.098 72.131 64.042C71.7484 63.986 71.3657 63.9067 70.983 63.804C70.6097 63.7013 70.2457 63.58 69.891 63.44C69.5457 63.3 69.2237 63.1413 68.925 62.964L70.101 60.57C70.4277 60.7753 70.7684 60.9573 71.123 61.116C71.4217 61.256 71.7577 61.382 72.131 61.494C72.5137 61.606 72.901 61.662 73.293 61.662C73.5917 61.662 73.797 61.6247 73.909 61.55C74.0304 61.466 74.091 61.3587 74.091 61.228C74.091 61.088 74.0304 60.9713 73.909 60.878C73.797 60.7753 73.6384 60.6867 73.433 60.612C73.2277 60.5373 72.9897 60.4627 72.719 60.388C72.4577 60.3133 72.1777 60.2247 71.879 60.122C71.4404 59.9727 71.0624 59.814 70.745 59.646C70.4277 59.4687 70.1664 59.2727 69.961 59.058C69.7557 58.834 69.6017 58.582 69.499 58.302C69.4057 58.022 69.359 57.7 69.359 57.336C69.359 56.7853 69.457 56.3 69.653 55.88C69.8584 55.46 70.1337 55.11 70.479 54.83C70.8244 54.55 71.2164 54.34 71.655 54.2C72.103 54.0507 72.5744 53.976 73.069 53.976C73.433 53.976 73.7877 54.0133 74.133 54.088C74.4784 54.1533 74.8097 54.242 75.127 54.354C75.4537 54.4567 75.757 54.5733 76.037 54.704C76.317 54.8253 76.569 54.942 76.793 55.054L75.617 57.308ZM62.334 64.084C61.578 64.084 60.892 63.9393 60.276 63.65C59.66 63.3607 59.1327 62.9827 58.694 62.516C58.2553 62.04 57.9146 61.4987 57.672 60.892C57.4293 60.2853 57.308 59.66 57.308 59.016C57.308 58.3627 57.434 57.7327 57.686 57.126C57.938 56.5193 58.288 55.9873 58.736 55.53C59.1933 55.0633 59.73 54.6947 60.346 54.424C60.9713 54.144 61.6526 54.004 62.39 54.004C63.146 54.004 63.832 54.1487 64.448 54.438C65.064 54.7273 65.5913 55.11 66.03 55.586C66.4687 56.062 66.8046 56.6033 67.038 57.21C67.2807 57.8167 67.402 58.4373 67.402 59.072C67.402 59.7253 67.276 60.3553 67.024 60.962C66.772 61.5593 66.422 62.0913 65.974 62.558C65.526 63.0153 64.9893 63.384 64.364 63.664C63.748 63.944 63.0713 64.084 62.334 64.084ZM86.8757 58.764V64H89.6057V54.06H86.6377L84.4817 58.736L82.3397 54.06H79.3577V64H82.0877V58.764L83.7537 62.446H85.2097L86.8757 58.764ZM95.0029 54.06H97.4949L100.939 64H98.1669L97.5649 62.054H94.9189L94.3309 64H91.5449L95.0029 54.06ZM105.615 64V59.114L109.563 64H111.733V54.06H109.003V59.114L105.013 54.06H102.885V64H105.615ZM114.559 64V54.06H118.381C119.203 54.06 119.926 54.1907 120.551 54.452C121.177 54.7133 121.699 55.068 122.119 55.516C122.539 55.964 122.857 56.4913 123.071 57.098C123.286 57.6953 123.393 58.3347 123.393 59.016C123.393 59.772 123.272 60.458 123.029 61.074C122.796 61.6807 122.46 62.2033 122.021 62.642C121.583 63.0713 121.055 63.4073 120.439 63.65C119.823 63.8833 119.137 64 118.381 64H114.559ZM129.965 54.06V64H137.203V61.62H132.695V54.06H129.965ZM139.275 64V54.06H142.005V64H139.275ZM148.702 60.57L146.756 54.06H143.872L147.568 64H149.836L153.49 54.06H150.62L148.702 60.57ZM162.449 61.62V64H155.365V54.06H162.323V56.44H158.095V57.84H161.707V60.052H158.095V61.62H162.449Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
</group>
</vector>

View file

@ -0,0 +1,40 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="212dp"
android:height="36dp"
android:viewportWidth="212"
android:viewportHeight="36">
<group>
<clip-path android:pathData="M0,0h212v36h-212z M 0,0"/>
<path
android:pathData="M152.786 33.58C154.074 34.14 155.474 34.42 156.986 34.42C158.497 34.42 159.912 34.084 161.228 33.412C162.572 32.74 163.635 31.718 164.419 30.346L164.546 31.48C164.658 32.404 165.077 33.118 165.805 33.622C166.533 34.098 167.486 34.336 168.661 34.336C169.053 34.336 169.474 34.308 169.922 34.252C170.37 34.224 170.902 34.14 171.518 34V28.33C170.986 28.274 170.607 28.12 170.383 27.868C170.188 27.588 170.09 27.112 170.09 26.44V3.34003H163.37V15.562C162.698 14.33 161.731 13.35 160.471 12.622C159.24 11.894 157.854 11.53 156.314 11.53C154.886 11.53 153.569 11.824 152.365 12.412C151.189 13 150.167 13.812 149.299 14.848C148.432 15.856 147.76 17.06 147.284 18.46C146.808 19.86 146.57 21.358 146.57 22.954C146.57 24.606 146.822 26.132 147.326 27.532C147.857 28.904 148.586 30.108 149.51 31.144C150.434 32.18 151.526 32.992 152.786 33.58ZM161.438 27.952C160.598 28.484 159.715 28.75 158.792 28.75C158.036 28.75 157.322 28.61 156.65 28.33C156.006 28.05 155.445 27.658 154.969 27.154C154.521 26.65 154.158 26.048 153.878 25.348C153.626 24.648 153.499 23.892 153.499 23.08C153.499 22.296 153.611 21.554 153.835 20.854C154.087 20.154 154.438 19.538 154.885 19.006C155.333 18.474 155.852 18.054 156.439 17.746C157.055 17.41 157.728 17.242 158.456 17.242C159.464 17.242 160.43 17.606 161.354 18.334C162.305 19.034 162.992 19.944 163.411 21.064V25.684C162.964 26.636 162.305 27.392 161.438 27.952Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M9.41489 32.95C11.2349 33.818 13.2509 34.252 15.4629 34.252C17.6189 34.252 19.6069 33.832 21.4269 32.992C23.2469 32.152 24.8149 31.046 26.1309 29.674C27.4469 28.274 28.4689 26.664 29.1969 24.844C29.9529 23.024 30.3309 21.134 30.3309 19.174C30.3309 17.298 29.9809 15.45 29.2809 13.63C28.5809 11.81 27.5869 10.186 26.2989 8.75803C25.0109 7.33003 23.4569 6.18203 21.6369 5.31403C19.8169 4.44603 17.8009 4.01203 15.5889 4.01203C13.4329 4.01203 11.4449 4.43203 9.6249 5.27203C7.8049 6.08403 6.2229 7.19003 4.87889 8.59003C3.56289 9.96203 2.5269 11.558 1.7709 13.378C1.0429 15.198 0.678894 17.088 0.678894 19.048C0.678894 20.98 1.0289 22.856 1.7289 24.676C2.4569 26.496 3.4649 28.12 4.7529 29.548C6.0409 30.948 7.59489 32.082 9.41489 32.95ZM8.1969 22.492C7.8609 21.4 7.69289 20.28 7.69289 19.132C7.69289 18.012 7.8469 16.92 8.1549 15.856C8.4909 14.764 8.9809 13.798 9.6249 12.958C10.2969 12.118 11.1089 11.446 12.0609 10.942C13.0409 10.41 14.1889 10.144 15.5049 10.144C16.7649 10.144 17.8709 10.396 18.8229 10.9C19.8029 11.376 20.6289 12.034 21.3009 12.874C21.9729 13.686 22.4769 14.638 22.8129 15.73C23.1489 16.794 23.3169 17.9 23.3169 19.048C23.3169 20.168 23.1489 21.274 22.8129 22.366C22.5049 23.43 22.0289 24.396 21.3849 25.264C20.7409 26.104 19.9289 26.79 18.9489 27.322C17.9689 27.854 16.8209 28.12 15.5049 28.12C14.2449 28.12 13.1249 27.868 12.1449 27.364C11.1649 26.86 10.3389 26.188 9.6669 25.348C9.0229 24.508 8.5329 23.556 8.1969 22.492Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M36.9151 33.538C38.7351 34.126 40.583 34.42 42.459 34.42C45.231 34.42 47.4291 33.776 49.0531 32.488C50.6771 31.2 51.4891 29.464 51.4891 27.28C51.4891 26.356 51.335 25.558 51.0271 24.886C50.7191 24.214 50.229 23.626 49.557 23.122C48.885 22.59 48.0031 22.114 46.9111 21.694C45.8471 21.274 44.5311 20.854 42.9631 20.434C41.4791 20.07 40.4571 19.734 39.8971 19.426C39.3651 19.118 39.099 18.656 39.099 18.04C39.099 17.396 39.3511 16.934 39.8551 16.654C40.3591 16.346 40.9751 16.192 41.7031 16.192C42.6271 16.192 43.5791 16.388 44.5591 16.78C45.5391 17.172 46.6591 17.802 47.9191 18.67L50.5231 14.638C49.1791 13.462 47.7791 12.65 46.3231 12.202C44.8951 11.754 43.3551 11.53 41.7031 11.53C40.4431 11.53 39.2671 11.712 38.1751 12.076C37.1111 12.44 36.187 12.944 35.403 13.588C34.619 14.232 34.0031 15.016 33.555 15.94C33.107 16.864 32.8831 17.886 32.8831 19.006C32.8831 19.846 33.0231 20.574 33.3031 21.19C33.583 21.806 34.0451 22.352 34.6891 22.828C35.3331 23.304 36.159 23.738 37.167 24.13C38.203 24.522 39.463 24.928 40.947 25.348C42.459 25.74 43.509 26.118 44.097 26.482C44.7131 26.818 45.0211 27.28 45.0211 27.868C45.0211 28.456 44.783 28.904 44.307 29.212C43.831 29.52 43.159 29.674 42.291 29.674C41.1151 29.674 39.883 29.422 38.5951 28.918C37.3351 28.414 36.0331 27.7 34.6891 26.776L32.295 30.892C33.555 32.04 35.0951 32.922 36.9151 33.538Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M89.584 34H82.864V21.61C82.864 20.154 82.598 19.104 82.066 18.46C81.534 17.788 80.848 17.452 80.008 17.452C79.56 17.452 79.098 17.55 78.622 17.746C78.174 17.942 77.754 18.222 77.362 18.586C76.97 18.922 76.606 19.328 76.27 19.804C75.962 20.28 75.71 20.798 75.514 21.358V34H68.794V21.61C68.794 20.154 68.528 19.104 67.996 18.46C67.464 17.788 66.778 17.452 65.938 17.452C65.042 17.452 64.16 17.816 63.292 18.544C62.452 19.244 61.836 20.182 61.444 21.358V34H54.724V11.95H60.772V15.646C61.584 14.302 62.676 13.28 64.048 12.58C65.448 11.88 67.072 11.53 68.92 11.53C69.844 11.53 70.642 11.642 71.314 11.866C72.014 12.09 72.616 12.398 73.12 12.79C73.624 13.182 74.03 13.644 74.338 14.176C74.646 14.68 74.87 15.226 75.01 15.814C75.85 14.442 76.956 13.392 78.328 12.664C79.7 11.908 81.268 11.53 83.032 11.53C84.432 11.53 85.552 11.796 86.392 12.328C87.26 12.832 87.932 13.504 88.408 14.344C88.884 15.156 89.192 16.052 89.332 17.032C89.5 18.012 89.584 18.964 89.584 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M108.844 4.18003H102.628L91.75 34H98.806L101.074 27.322H110.356L112.666 34H119.722L108.844 4.18003ZM105.736 12.034L109.222 22.576H102.166L105.736 12.034Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M143.365 34H136.645V21.61C136.645 20.154 136.365 19.104 135.805 18.46C135.273 17.788 134.559 17.452 133.663 17.452C133.187 17.452 132.711 17.55 132.235 17.746C131.759 17.942 131.297 18.222 130.849 18.586C130.401 18.922 129.995 19.328 129.631 19.804C129.295 20.28 129.029 20.798 128.833 21.358V34H122.113V11.95H128.161V15.646C128.973 14.33 130.121 13.322 131.605 12.622C133.089 11.894 134.797 11.53 136.729 11.53C138.157 11.53 139.305 11.796 140.173 12.328C141.041 12.832 141.713 13.504 142.189 14.344C142.665 15.156 142.973 16.052 143.113 17.032C143.281 18.012 143.365 18.964 143.365 19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M191 4H198V15H209V22H198V33H191V22H180V15H191V4Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
</group>
</vector>

View file

@ -0,0 +1,54 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="212dp"
android:height="72dp"
android:viewportWidth="212"
android:viewportHeight="72">
<path
android:pathData="M152.786,33.58C154.074,34.14 155.474,34.42 156.986,34.42C158.497,34.42 159.912,34.084 161.228,33.412C162.572,32.74 163.635,31.718 164.419,30.346L164.546,31.48C164.658,32.404 165.077,33.118 165.805,33.622C166.533,34.098 167.486,34.336 168.661,34.336C169.053,34.336 169.474,34.308 169.922,34.252C170.37,34.224 170.902,34.14 171.518,34V28.33C170.986,28.274 170.607,28.12 170.383,27.868C170.188,27.588 170.09,27.112 170.09,26.44V3.34H163.37V15.562C162.698,14.33 161.731,13.35 160.471,12.622C159.24,11.894 157.854,11.53 156.314,11.53C154.886,11.53 153.569,11.824 152.365,12.412C151.189,13 150.167,13.812 149.299,14.848C148.432,15.856 147.76,17.06 147.284,18.46C146.808,19.86 146.57,21.358 146.57,22.954C146.57,24.606 146.822,26.132 147.326,27.532C147.857,28.904 148.586,30.108 149.51,31.144C150.434,32.18 151.526,32.992 152.786,33.58ZM161.438,27.952C160.598,28.484 159.715,28.75 158.792,28.75C158.036,28.75 157.322,28.61 156.65,28.33C156.006,28.05 155.445,27.658 154.969,27.154C154.521,26.65 154.158,26.048 153.878,25.348C153.626,24.648 153.499,23.892 153.499,23.08C153.499,22.296 153.611,21.554 153.835,20.854C154.087,20.154 154.438,19.538 154.885,19.006C155.333,18.474 155.852,18.054 156.439,17.746C157.055,17.41 157.728,17.242 158.456,17.242C159.464,17.242 160.43,17.606 161.354,18.334C162.305,19.034 162.992,19.944 163.411,21.064V25.684C162.964,26.636 162.305,27.392 161.438,27.952Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M9.415,32.95C11.235,33.818 13.251,34.252 15.463,34.252C17.619,34.252 19.607,33.832 21.427,32.992C23.247,32.152 24.815,31.046 26.131,29.674C27.447,28.274 28.469,26.664 29.197,24.844C29.953,23.024 30.331,21.134 30.331,19.174C30.331,17.298 29.981,15.45 29.281,13.63C28.581,11.81 27.587,10.186 26.299,8.758C25.011,7.33 23.457,6.182 21.637,5.314C19.817,4.446 17.801,4.012 15.589,4.012C13.433,4.012 11.445,4.432 9.625,5.272C7.805,6.084 6.223,7.19 4.879,8.59C3.563,9.962 2.527,11.558 1.771,13.378C1.043,15.198 0.679,17.088 0.679,19.048C0.679,20.98 1.029,22.856 1.729,24.676C2.457,26.496 3.465,28.12 4.753,29.548C6.041,30.948 7.595,32.082 9.415,32.95ZM8.197,22.492C7.861,21.4 7.693,20.28 7.693,19.132C7.693,18.012 7.847,16.92 8.155,15.856C8.491,14.764 8.981,13.798 9.625,12.958C10.297,12.118 11.109,11.446 12.061,10.942C13.041,10.41 14.189,10.144 15.505,10.144C16.765,10.144 17.871,10.396 18.823,10.9C19.803,11.376 20.629,12.034 21.301,12.874C21.973,13.686 22.477,14.638 22.813,15.73C23.149,16.794 23.317,17.9 23.317,19.048C23.317,20.168 23.149,21.274 22.813,22.366C22.505,23.43 22.029,24.396 21.385,25.264C20.741,26.104 19.929,26.79 18.949,27.322C17.969,27.854 16.821,28.12 15.505,28.12C14.245,28.12 13.125,27.868 12.145,27.364C11.165,26.86 10.339,26.188 9.667,25.348C9.023,24.508 8.533,23.556 8.197,22.492Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M36.915,33.538C38.735,34.126 40.583,34.42 42.459,34.42C45.231,34.42 47.429,33.776 49.053,32.488C50.677,31.2 51.489,29.464 51.489,27.28C51.489,26.356 51.335,25.558 51.027,24.886C50.719,24.214 50.229,23.626 49.557,23.122C48.885,22.59 48.003,22.114 46.911,21.694C45.847,21.274 44.531,20.854 42.963,20.434C41.479,20.07 40.457,19.734 39.897,19.426C39.365,19.118 39.099,18.656 39.099,18.04C39.099,17.396 39.351,16.934 39.855,16.654C40.359,16.346 40.975,16.192 41.703,16.192C42.627,16.192 43.579,16.388 44.559,16.78C45.539,17.172 46.659,17.802 47.919,18.67L50.523,14.638C49.179,13.462 47.779,12.65 46.323,12.202C44.895,11.754 43.355,11.53 41.703,11.53C40.443,11.53 39.267,11.712 38.175,12.076C37.111,12.44 36.187,12.944 35.403,13.588C34.619,14.232 34.003,15.016 33.555,15.94C33.107,16.864 32.883,17.886 32.883,19.006C32.883,19.846 33.023,20.574 33.303,21.19C33.583,21.806 34.045,22.352 34.689,22.828C35.333,23.304 36.159,23.738 37.167,24.13C38.203,24.522 39.463,24.928 40.947,25.348C42.459,25.74 43.509,26.118 44.097,26.482C44.713,26.818 45.021,27.28 45.021,27.868C45.021,28.456 44.783,28.904 44.307,29.212C43.831,29.52 43.159,29.674 42.291,29.674C41.115,29.674 39.883,29.422 38.595,28.918C37.335,28.414 36.033,27.7 34.689,26.776L32.295,30.892C33.555,32.04 35.095,32.922 36.915,33.538Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M89.584,34H82.864V21.61C82.864,20.154 82.598,19.104 82.066,18.46C81.534,17.788 80.848,17.452 80.008,17.452C79.56,17.452 79.098,17.55 78.622,17.746C78.174,17.942 77.754,18.222 77.362,18.586C76.97,18.922 76.606,19.328 76.27,19.804C75.962,20.28 75.71,20.798 75.514,21.358V34H68.794V21.61C68.794,20.154 68.528,19.104 67.996,18.46C67.464,17.788 66.778,17.452 65.938,17.452C65.042,17.452 64.16,17.816 63.292,18.544C62.452,19.244 61.836,20.182 61.444,21.358V34H54.724V11.95H60.772V15.646C61.584,14.302 62.676,13.28 64.048,12.58C65.448,11.88 67.072,11.53 68.92,11.53C69.844,11.53 70.642,11.642 71.314,11.866C72.014,12.09 72.616,12.398 73.12,12.79C73.624,13.182 74.03,13.644 74.338,14.176C74.646,14.68 74.87,15.226 75.01,15.814C75.85,14.442 76.956,13.392 78.328,12.664C79.7,11.908 81.268,11.53 83.032,11.53C84.432,11.53 85.552,11.796 86.392,12.328C87.26,12.832 87.932,13.504 88.408,14.344C88.884,15.156 89.192,16.052 89.332,17.032C89.5,18.012 89.584,18.964 89.584,19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M108.844,4.18H102.628L91.75,34H98.806L101.074,27.322H110.356L112.666,34H119.722L108.844,4.18ZM105.736,12.034L109.222,22.576H102.166L105.736,12.034Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
<path
android:pathData="M143.365,34H136.645V21.61C136.645,20.154 136.365,19.104 135.805,18.46C135.273,17.788 134.559,17.452 133.663,17.452C133.187,17.452 132.711,17.55 132.235,17.746C131.759,17.942 131.297,18.222 130.849,18.586C130.401,18.922 129.995,19.328 129.631,19.804C129.295,20.28 129.029,20.798 128.833,21.358V34H122.113V11.95H128.161V15.646C128.973,14.33 130.121,13.322 131.605,12.622C133.089,11.894 134.797,11.53 136.729,11.53C138.157,11.53 139.305,11.796 140.173,12.328C141.041,12.832 141.713,13.504 142.189,14.344C142.665,15.156 142.973,16.052 143.113,17.032C143.281,18.012 143.365,18.964 143.365,19.888V34Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M198,4H191V15H180V22H191V33H198V22H209V15H198V4Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M60.22,60.024C60.127,59.707 60.08,59.38 60.08,59.044C60.08,58.717 60.122,58.4 60.206,58.092C60.299,57.775 60.439,57.495 60.626,57.252C60.813,57 61.046,56.799 61.326,56.65C61.615,56.501 61.956,56.426 62.348,56.426C62.731,56.426 63.062,56.501 63.342,56.65C63.631,56.79 63.869,56.981 64.056,57.224C64.252,57.457 64.397,57.733 64.49,58.05C64.583,58.358 64.63,58.68 64.63,59.016C64.63,59.343 64.583,59.665 64.49,59.982C64.406,60.299 64.271,60.584 64.084,60.836C63.907,61.079 63.673,61.279 63.384,61.438C63.095,61.587 62.754,61.662 62.362,61.662C61.97,61.662 61.629,61.587 61.34,61.438C61.06,61.289 60.827,61.093 60.64,60.85C60.453,60.607 60.313,60.332 60.22,60.024Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M96.249,57.154L97.131,60.234H95.325L96.249,57.154Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M120.621,59.016C120.621,58.633 120.57,58.283 120.467,57.966C120.365,57.649 120.215,57.378 120.019,57.154C119.833,56.93 119.599,56.757 119.319,56.636C119.039,56.505 118.727,56.44 118.381,56.44H117.289V61.62H118.381C118.736,61.62 119.053,61.555 119.333,61.424C119.613,61.293 119.847,61.111 120.033,60.878C120.229,60.645 120.374,60.369 120.467,60.052C120.57,59.735 120.621,59.389 120.621,59.016Z"
android:fillColor="#000000"
android:fillAlpha="0.15"/>
<path
android:pathData="M51,47C49.895,47 49,47.895 49,49V69C49,70.105 49.895,71 51,71H169C170.105,71 171,70.105 171,69V49C171,47.895 170.105,47 169,47H51ZM74.749,56.86C75.048,56.991 75.337,57.14 75.617,57.308L76.793,55.054C76.569,54.942 76.317,54.825 76.037,54.704C75.757,54.573 75.454,54.457 75.127,54.354C74.81,54.242 74.478,54.153 74.133,54.088C73.788,54.013 73.433,53.976 73.069,53.976C72.574,53.976 72.103,54.051 71.655,54.2C71.216,54.34 70.824,54.55 70.479,54.83C70.134,55.11 69.858,55.46 69.653,55.88C69.457,56.3 69.359,56.785 69.359,57.336C69.359,57.7 69.406,58.022 69.499,58.302C69.602,58.582 69.756,58.834 69.961,59.058C70.166,59.273 70.428,59.469 70.745,59.646C71.062,59.814 71.44,59.973 71.879,60.122C72.178,60.225 72.458,60.313 72.719,60.388C72.99,60.463 73.228,60.537 73.433,60.612C73.638,60.687 73.797,60.775 73.909,60.878C74.03,60.971 74.091,61.088 74.091,61.228C74.091,61.359 74.03,61.466 73.909,61.55C73.797,61.625 73.592,61.662 73.293,61.662C72.901,61.662 72.514,61.606 72.131,61.494C71.758,61.382 71.422,61.256 71.123,61.116C70.768,60.957 70.428,60.775 70.101,60.57L68.925,62.964C69.224,63.141 69.546,63.3 69.891,63.44C70.246,63.58 70.61,63.701 70.983,63.804C71.366,63.907 71.748,63.986 72.131,64.042C72.514,64.098 72.887,64.126 73.251,64.126C73.708,64.126 74.161,64.075 74.609,63.972C75.066,63.86 75.472,63.683 75.827,63.44C76.191,63.197 76.48,62.875 76.695,62.474C76.919,62.063 77.031,61.559 77.031,60.962C77.031,60.495 76.961,60.099 76.821,59.772C76.681,59.445 76.48,59.17 76.219,58.946C75.958,58.713 75.64,58.512 75.267,58.344C74.903,58.176 74.492,58.022 74.035,57.882C73.746,57.789 73.484,57.709 73.251,57.644C73.027,57.579 72.836,57.513 72.677,57.448C72.518,57.373 72.397,57.294 72.313,57.21C72.229,57.126 72.187,57.019 72.187,56.888C72.187,56.711 72.257,56.585 72.397,56.51C72.546,56.435 72.742,56.398 72.985,56.398C73.284,56.398 73.587,56.449 73.895,56.552C74.212,56.645 74.497,56.748 74.749,56.86ZM60.276,63.65C60.892,63.939 61.578,64.084 62.334,64.084C63.071,64.084 63.748,63.944 64.364,63.664C64.989,63.384 65.526,63.015 65.974,62.558C66.422,62.091 66.772,61.559 67.024,60.962C67.276,60.355 67.402,59.725 67.402,59.072C67.402,58.437 67.281,57.817 67.038,57.21C66.805,56.603 66.469,56.062 66.03,55.586C65.591,55.11 65.064,54.727 64.448,54.438C63.832,54.149 63.146,54.004 62.39,54.004C61.653,54.004 60.971,54.144 60.346,54.424C59.73,54.695 59.193,55.063 58.736,55.53C58.288,55.987 57.938,56.519 57.686,57.126C57.434,57.733 57.308,58.363 57.308,59.016C57.308,59.66 57.429,60.285 57.672,60.892C57.915,61.499 58.255,62.04 58.694,62.516C59.133,62.983 59.66,63.361 60.276,63.65ZM86.876,64V58.764L85.21,62.446H83.754L82.088,58.764V64H79.358V54.06H82.34L84.482,58.736L86.638,54.06H89.606V64H86.876ZM97.495,54.06H95.003L91.545,64H94.331L94.919,62.054H97.565L98.167,64H100.939L97.495,54.06ZM105.615,59.114V64H102.885V54.06H105.013L109.003,59.114V54.06H111.733V64H109.563L105.615,59.114ZM114.559,54.06V64H118.381C119.137,64 119.823,63.883 120.439,63.65C121.055,63.407 121.583,63.071 122.021,62.642C122.46,62.203 122.796,61.681 123.029,61.074C123.272,60.458 123.393,59.772 123.393,59.016C123.393,58.335 123.286,57.695 123.071,57.098C122.857,56.491 122.539,55.964 122.119,55.516C121.699,55.068 121.177,54.713 120.551,54.452C119.926,54.191 119.203,54.06 118.381,54.06H114.559ZM129.965,64V54.06H132.695V61.62H137.203V64H129.965ZM139.275,54.06V64H142.005V54.06H139.275ZM146.756,54.06L148.702,60.57L150.62,54.06H153.49L149.836,64H147.568L143.872,54.06H146.756ZM162.449,64V61.62H158.095V60.052H161.707V57.84H158.095V56.44H162.323V54.06H155.365V64H162.449Z"
android:fillColor="#000000"
android:fillAlpha="0.15"
android:fillType="evenOdd"/>
</vector>

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/switch_button_active_dark" />
<corners android:radius="3dp" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_dark" />
</shape>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/switch_button_active_dark" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke android:width="1dp" android:color="@color/active_color_primary_dark" />
</shape>
</item>
</selector>

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/switch_button_active_light" />
<corners android:radius="3dp" />
<stroke
android:width="1dp"
android:color="@color/active_color_primary_light" />
</shape>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="@color/switch_button_active_stroke_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/switch_button_active_light" />
<corners android:radius="@dimen/dlg_button_rect_rad" />
<stroke android:width="1dp" android:color="@color/active_color_primary_light" />
</shape>
</item>
</selector>

View file

@ -1,20 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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"
android:clickable="true">
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
android:clickable="true"
tools:background="@drawable/bg_bottom_menu_dark">
<ProgressBar
@ -24,7 +25,7 @@
android:layout_height="wrap_content"
android:minHeight="0dp"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
@ -35,6 +36,7 @@
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.45"
android:layout_gravity="center_vertical"
android:background="?attr/selectableItemBackground">
<androidx.appcompat.widget.AppCompatImageView
@ -69,43 +71,39 @@
android:id="@+id/measurement_distance_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_text_margin"
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
android:layout_marginRight="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_button_padding"
android:layout_marginLeft="@dimen/measurement_tool_text_button_padding"
android:layout_marginTop="@dimen/bottom_sheet_title_padding_bottom"
android:layout_marginEnd="@dimen/text_margin_small"
android:layout_marginRight="@dimen/text_margin_small"
android:layout_toEndOf="@id/main_icon"
android:layout_toRightOf="@id/main_icon"
android:textAppearance="@style/TextAppearance.ListItemTitle"
tools:text="724 m,"/>
tools:text="724 m," />
<TextView
android:id="@+id/measurement_points_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignEnd="@id/up_down_button"
android:layout_toEndOf="@id/measurement_distance_text_view"
android:layout_toRightOf="@id/measurement_distance_text_view"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"
tools:text="points: 3"/>
android:layout_alignRight="@id/up_down_button"
android:layout_marginTop="@dimen/bottom_sheet_title_padding_bottom"
android:textAppearance="@style/TextAppearance.ListItemCategoryTitle"
tools:text="points: 3" />
<TextView
android:id="@+id/distance_to_center_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/measurement_points_text_view"
android:layout_toLeftOf="@id/up_down_button"
android:layout_toRightOf="@id/measurement_points_text_view"
android:layout_toStartOf="@id/up_down_button"
android:layout_marginEnd="@dimen/measurement_tool_text_margin"
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
android:layout_marginRight="@dimen/measurement_tool_text_margin"
android:layout_marginStart="@dimen/measurement_tool_text_margin"
android:textColor="@color/color_distance"
android:textSize="@dimen/default_list_text_size"
tools:text=" 700 m"/>
android:layout_below="@id/measurement_points_text_view"
android:layout_alignStart="@+id/measurement_distance_text_view"
android:layout_alignLeft="@+id/measurement_distance_text_view"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
tools:text=" 700 m" />
<TextView
android:id="@+id/move_point_text"
@ -143,132 +141,109 @@
android:layout_height="match_parent"
android:background="?attr/dashboard_divider"/>
<LinearLayout
<RelativeLayout
android:id="@+id/measure_mode_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.55">
android:layout_weight="0.55"
android:padding="@dimen/content_padding_half">
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/options_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:layout_marginBottom="@dimen/measurement_tool_button_padding"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
osmand:typeface="@string/font_roboto_medium"/>
</FrameLayout>
<ImageButton
android:id="@+id/undo_point_button"
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/options_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_undo_dark"/>
android:maxLines="1"
android:paddingLeft="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_options"
android:textColor="?attr/color_dialog_buttons"
osmand:typeface="@string/font_roboto_medium" />
<ImageButton
android:id="@+id/redo_point_button"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/measurement_tool_button_padding"
android:layout_marginStart="@dimen/measurement_tool_button_padding"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_redo_dark"/>
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_centerInParent="true">
<Button
android:id="@+id/add_point_button"
<ImageButton
android:id="@+id/undo_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:maxLines="1"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
</FrameLayout>
android:layout_centerVertical="true"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/shared_string_undo"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_undo_dark" />
</LinearLayout>
<ImageButton
android:id="@+id/redo_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/measurement_tool_button_padding"
android:layout_marginLeft="@dimen/measurement_tool_button_padding"
android:layout_toRightOf="@id/undo_point_button"
android:layout_toEndOf="@id/undo_point_button"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/shared_string_redo"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
tools:src="@drawable/ic_action_redo_dark" />
</RelativeLayout>
<include
android:id="@+id/add_point_button"
layout="@layout/bottom_sheet_dialog_button"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/move_point_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.6"
android:layout_weight="0.55"
android:visibility="gone">
<Button
<include
android:id="@+id/apply_move_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_move_point_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="@dimen/measurement_tool_button_height"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingStart="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_cancel"
android:textColor="?attr/color_dialog_buttons"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"/>
osmand:typeface="@string/font_roboto_medium" />
</RelativeLayout>
<LinearLayout
<RelativeLayout
android:id="@+id/add_point_before_after_controls"
android:layout_width="0dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:layout_weight="0.6"
android:layout_weight="0.55"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
@ -276,59 +251,48 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="@dimen/measurement_tool_button_height"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/content_padding_small"
android:layout_marginLeft="@dimen/content_padding_small"
android:gravity="center_vertical"
android:paddingEnd="@dimen/measurement_tool_text_button_padding_small"
android:paddingLeft="@dimen/measurement_tool_text_button_padding"
android:paddingLeft="@dimen/measurement_tool_text_button_padding_small"
android:paddingRight="@dimen/measurement_tool_text_button_padding_small"
android:paddingStart="@dimen/measurement_tool_text_button_padding"
android:paddingStart="@dimen/measurement_tool_text_button_padding_small"
android:text="@string/shared_string_cancel"
android:textColor="?attr/color_dialog_buttons"
osmand:textAllCapsCompat="true"
osmand:typeface="@string/font_roboto_medium"/>
osmand:typeface="@string/font_roboto_medium" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
android:layout_height="match_parent" />
<Button
<include
android:id="@+id/apply_point_before_after_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round_border"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="?attr/color_dialog_buttons"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
android:layout_toStartOf="@id/add_point_before_after_button"
android:layout_toLeftOf="@id/add_point_before_after_button"
android:layout_centerVertical="true"
layout="@layout/bottom_sheet_dialog_button" />
<Button
<include
android:id="@+id/add_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingStart="@dimen/measurement_tool_button_padding"
android:paddingEnd="@dimen/measurement_tool_button_padding" />
</LinearLayout>
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
layout="@layout/bottom_sheet_dialog_button" />
</RelativeLayout>
</LinearLayout>

View file

@ -536,11 +536,11 @@
<ImageButton
android:id="@+id/widget_top_bar_back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_width="@dimen/toolbar_height"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
osmand:srcCompat="@drawable/ic_arrow_back"/>
osmand:srcCompat="@drawable/ic_arrow_back" />
<LinearLayout
android:id="@+id/widget_top_bar_title_layout"
@ -549,8 +549,8 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
android:paddingBottom="@dimen/toolbar_title_padding_bottom"
android:paddingTop="@dimen/toolbar_title_padding_top">
<TextView
android:id="@+id/widget_top_bar_title"
@ -598,7 +598,7 @@
android:id="@+id/widget_top_bar_refresh_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_refresh"
osmand:srcCompat="@drawable/ic_action_refresh_dark"
@ -608,7 +608,7 @@
android:id="@+id/widget_top_bar_close_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_close"
osmand:srcCompat="@drawable/ic_action_remove_dark"/>
@ -616,7 +616,7 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/widget_top_bar_save"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:background="@null"
android:ellipsize="end"
android:gravity="center_vertical"
@ -636,7 +636,7 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/widget_top_bar_switch"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:paddingEnd="16dp"
android:paddingRight="16dp"
android:visibility="gone"

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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"
android:clickable="true">
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/main_view"
@ -14,8 +14,9 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/bg_bottom_menu_dark"
android:orientation="vertical"
android:clickable="true"
android:orientation="vertical">
android:focusable="true">
<ProgressBar
android:id="@+id/snap_to_road_progress_bar"
@ -24,7 +25,7 @@
android:layout_height="wrap_content"
android:minHeight="0dp"
android:visibility="gone"
tools:visibility="visible"/>
tools:visibility="visible" />
<RelativeLayout
android:id="@+id/up_down_row"
@ -81,8 +82,10 @@
android:layout_marginTop="@dimen/measurement_tool_button_padding"
android:layout_toEndOf="@id/measurement_distance_text_view"
android:layout_toRightOf="@id/measurement_distance_text_view"
android:layout_alignEnd="@id/up_down_button"
android:layout_alignRight="@id/up_down_button"
android:textAppearance="@style/TextAppearance.ListItemCategoryTitle"
tools:text="points: 3"/>
tools:text="points: 3" />
<TextView
android:id="@+id/distance_to_center_text_view"
@ -159,8 +162,8 @@
android:id="@+id/measure_mode_controls"
android:layout_width="match_parent"
android:layout_height="@dimen/measurement_tool_controls_height"
android:paddingTop="@dimen/measurement_tool_button_padding_top"
android:paddingBottom="@dimen/measurement_tool_button_padding_top"
android:paddingTop="@dimen/measurement_tool_button_margin"
android:paddingBottom="@dimen/measurement_tool_button_margin"
android:paddingLeft="@dimen/measurement_tool_button_margin"
android:paddingRight="@dimen/measurement_tool_button_margin">
@ -189,6 +192,7 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
android:contentDescription="@string/shared_string_undo"
tools:src="@drawable/ic_action_undo_dark"/>
<ImageButton
@ -199,6 +203,7 @@
android:layout_marginStart="@dimen/measurement_tool_button_padding"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/measurement_tool_undo_redo_padding_small"
android:contentDescription="@string/shared_string_redo"
tools:src="@drawable/ic_action_redo_dark"/>
<FrameLayout
@ -206,22 +211,12 @@
android:layout_height="match_parent"
android:layout_weight="1">
<Button
<include
android:id="@+id/add_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_gravity="end"
android:background="?attr/btn_round"
android:ellipsize="end"
android:maxLines="1"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
</FrameLayout>
</LinearLayout>
@ -232,26 +227,16 @@
android:layout_height="@dimen/measurement_tool_controls_height"
android:visibility="gone">
<Button
<include
android:id="@+id/apply_move_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/cancel_move_point_button"
@ -269,7 +254,7 @@
<LinearLayout
android:id="@+id/add_point_before_after_controls"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_height="@dimen/measurement_tool_controls_height"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
@ -291,41 +276,24 @@
android:layout_height="match_parent"
android:layout_weight="1"/>
<Button
<include
android:id="@+id/apply_point_before_after_point_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round_border"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_apply"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
<Button
<include
android:id="@+id/add_point_before_after_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/measurement_tool_button_margin"
android:layout_height="@dimen/measurement_tool_button_height"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/measurement_tool_button_width"
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
android:layout_marginRight="@dimen/measurement_tool_button_margin"
android:layout_marginTop="@dimen/measurement_tool_button_margin"
android:background="?attr/btn_round"
android:minHeight="@dimen/measurement_tool_button_height"
android:paddingLeft="@dimen/measurement_tool_button_padding"
android:paddingRight="@dimen/measurement_tool_button_padding"
android:text="@string/shared_string_add"
android:textColor="@color/color_white"
android:textAllCaps="false"
android:paddingEnd="@dimen/measurement_tool_button_padding"
android:paddingStart="@dimen/measurement_tool_button_padding" />
layout="@layout/bottom_sheet_dialog_button" />
</LinearLayout>
</LinearLayout>

View file

@ -65,23 +65,6 @@
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
<LinearLayout
android:id="@+id/buttons_container"
android:layout_width="match_parent"
android:layout_height="@dimen/dialog_button_ex_height"
android:gravity="center"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:paddingStart="@dimen/content_padding">
<include
android:id="@+id/dismiss_button"
layout="@layout/bottom_sheet_dialog_button" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -116,12 +116,13 @@
tools:src="@drawable/ic_action_remove_dark"
android:contentDescription="@string/snap_to_road" />
<include
layout="@layout/map_ruler"
android:layout_width="@dimen/map_ruler_width"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/map_button_margin"
android:layout_marginLeft="@dimen/map_button_margin" />
<include
layout="@layout/map_ruler"
android:layout_width="@dimen/map_ruler_width"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginStart="@dimen/map_button_margin"
android:layout_marginLeft="@dimen/map_button_margin" />
</LinearLayout>

View file

@ -210,8 +210,8 @@
android:layout_marginLeft="@dimen/map_button_margin"
android:layout_marginRight="@dimen/map_button_margin"
tools:src="@drawable/ic_action_remove_dark"
android:layout_marginStart="@dimen/map_button_margin"
android:layout_marginEnd="@dimen/map_button_margin" />
android:layout_marginStart="@dimen/map_button_margin"
android:layout_marginEnd="@dimen/map_button_margin" />
<LinearLayout
android:layout_width="wrap_content"
@ -322,8 +322,8 @@
<ImageButton
android:id="@+id/widget_top_bar_back_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_width="@dimen/toolbar_height"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/back_to_search"
osmand:srcCompat="@drawable/ic_arrow_back"/>
@ -335,8 +335,8 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp">
android:paddingBottom="@dimen/toolbar_title_padding_bottom"
android:paddingTop="@dimen/toolbar_title_padding_top">
<TextView
android:id="@+id/widget_top_bar_title"
@ -370,7 +370,7 @@
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
android:maxLines="1"
android:layout_marginTop="8dp"
android:layout_marginTop="@dimen/content_padding_half"
android:textColor="?attr/wikivoyage_active_color"
android:textSize="@dimen/default_list_text_size"
android:visibility="gone"
@ -384,7 +384,7 @@
android:id="@+id/widget_top_bar_refresh_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_refresh"
osmand:srcCompat="@drawable/ic_action_refresh_dark"
@ -394,7 +394,7 @@
android:id="@+id/widget_top_bar_close_button"
style="@style/Widget.AppCompat.ActionButton"
android:layout_width="48dp"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:layout_gravity="top"
android:contentDescription="@string/shared_string_close"
osmand:srcCompat="@drawable/ic_action_remove_dark"/>
@ -402,13 +402,13 @@
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/widget_top_bar_save"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_height="@dimen/toolbar_height"
android:background="@null"
android:ellipsize="end"
android:gravity="center_vertical"
android:lines="1"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:paddingRight="@dimen/content_padding"
android:paddingEnd="@dimen/content_padding"
android:textAllCaps="true"
android:singleLine="true"
android:textColor="?android:textColorPrimary"
@ -422,9 +422,9 @@
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/widget_top_bar_switch"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingEnd="16dp"
android:paddingRight="16dp"
android:layout_height="@dimen/toolbar_height"
android:paddingEnd="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:visibility="gone"
tools:visibility="visible"/>
@ -435,8 +435,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:animateLayoutChanges="true"
android:visibility="gone"/>
android:animateLayoutChanges="true"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/widget_top_bar_shadow"
@ -594,7 +594,7 @@
android:textColor="@color/marker_top_2nd_line_color"
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
android:layout_toEndOf="@+id/map_marker_dist_2nd" />
android:layout_toEndOf="@+id/map_marker_dist_2nd" />
</RelativeLayout>
@ -781,8 +781,8 @@
android:layout_marginLeft="@dimen/widget_turn_lane_border"
android:layout_marginRight="@dimen/widget_turn_lane_border"
android:layout_marginTop="@dimen/widget_turn_lane_border"
android:layout_marginStart="@dimen/widget_turn_lane_border"
android:layout_marginEnd="@dimen/widget_turn_lane_border" />
android:layout_marginStart="@dimen/widget_turn_lane_border"
android:layout_marginEnd="@dimen/widget_turn_lane_border" />
<FrameLayout
android:layout_width="wrap_content"
@ -802,8 +802,8 @@
android:textColor="@color/color_black"
android:textSize="@dimen/map_button_text_size"
tools:text="1048 km"
android:layout_marginEnd="@dimen/widget_turn_lane_border"
android:layout_marginStart="@dimen/widget_turn_lane_border" />
android:layout_marginEnd="@dimen/widget_turn_lane_border"
android:layout_marginStart="@dimen/widget_turn_lane_border" />
<TextView
android:id="@+id/map_lanes_dist_text"
@ -816,8 +816,8 @@
android:textColor="@color/color_black"
android:textSize="@dimen/map_button_text_size"
tools:text="1048 km"
android:layout_marginEnd="@dimen/widget_turn_lane_border"
android:layout_marginStart="@dimen/widget_turn_lane_border" />
android:layout_marginEnd="@dimen/widget_turn_lane_border"
android:layout_marginStart="@dimen/widget_turn_lane_border" />
</FrameLayout>

View file

@ -80,7 +80,6 @@
<dimen name="measurement_tool_text_margin">12dp</dimen>
<dimen name="measurement_tool_points_list_container_height">330dp</dimen>
<dimen name="measurement_tool_up_down_row_height">48dp</dimen>
<dimen name="measurement_tool_controls_height">84dp</dimen>
<dimen name="measurement_tool_text_button_padding_small">18dp</dimen>
<dimen name="measurement_tool_text_button_padding">24dp</dimen>
<dimen name="measurement_tool_undo_redo_padding_small">18dp</dimen>

View file

@ -256,7 +256,7 @@
<dimen name="measurement_tool_text_margin">8dp</dimen>
<dimen name="measurement_tool_points_list_container_height">220dp</dimen>
<dimen name="measurement_tool_up_down_row_height">60dp</dimen>
<dimen name="measurement_tool_controls_height">56dp</dimen>
<dimen name="measurement_tool_controls_height">52dp</dimen>
<dimen name="measurement_tool_text_button_padding_small">8dp</dimen>
<dimen name="measurement_tool_text_button_padding">16dp</dimen>
<dimen name="measurement_tool_undo_redo_padding_small">6dp</dimen>
@ -268,6 +268,7 @@
<dimen name="measurement_tool_button_padding">8dp</dimen>
<dimen name="measurement_tool_button_padding_top">10dp</dimen>
<dimen name="measurement_tool_button_height">36dp</dimen>
<dimen name="measurement_tool_button_width">98dp</dimen>
<dimen name="measurement_tool_options_divider_margin_start">72dp</dimen>
<dimen name="bottom_sheet_title_height">52dp</dimen>
<dimen name="bottom_sheet_descr_height">44dp</dimen>
@ -352,6 +353,8 @@
<dimen name="toolbar_height_expanded">96dp</dimen>
<dimen name="toolbar_inset_start_with_navigation">72dp</dimen>
<dimen name="toolbar_inset_start">54dp</dimen>
<dimen name="toolbar_title_padding_top">7dp</dimen>
<dimen name="toolbar_title_padding_bottom">6dp</dimen>
<dimen name="wikivoyage_search_list_header_height">36dp</dimen>
<dimen name="wikivoyage_article_card_icon_size">80dp</dimen>

View file

@ -16,6 +16,7 @@
<string name="click_button_to_start_server">Click button to start server</string>
<string name="click_button_to_stop_server">Click second button to deactivate server</string>
<string name="web_server">Web server</string>
<string name="shared_string_redo">Redo</string>
<string name="one_point_error">Please add at least two points.</string>
<string name="shared_string_is_saved">is saved</string>
<string name="open_saved_track">Open saved track</string>

View file

@ -525,7 +525,7 @@ public abstract class OsmandPlugin {
protected void registerLayerContextMenuActions(OsmandMapTileView mapView, ContextMenuAdapter adapter, MapActivity mapActivity) {
}
protected void registerMapContextMenuActions(MapActivity mapActivity, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj) {
protected void registerMapContextMenuActions(MapActivity mapActivity, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
}
protected void registerOptionsMenuItems(MapActivity mapActivity, ContextMenuAdapter helper) {
@ -791,9 +791,9 @@ public abstract class OsmandPlugin {
}
}
public static void registerMapContextMenu(MapActivity map, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj) {
public static void registerMapContextMenu(MapActivity map, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
for (OsmandPlugin plugin : getEnabledPlugins()) {
plugin.registerMapContextMenuActions(map, latitude, longitude, adapter, selectedObj);
plugin.registerMapContextMenuActions(map, latitude, longitude, adapter, selectedObj, configureMenu);
}
}

View file

@ -383,7 +383,7 @@ public class MapActivityActions implements DialogProvider {
.setOrder(SEARCH_NEAR_ITEM_ORDER)
.createItem());
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj);
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj, configureMenu);
ItemClickListener listener = new ItemClickListener() {
@Override

View file

@ -165,33 +165,34 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
registerListPreference(settings.ARRIVAL_DISTANCE_FACTOR, screen, arrivalNames, arrivalValues);
//array size must be equal!
Float[] speedLimitsKmh = new Float[]{-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
Float[] speedLimitsMph = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
//array size must be equal!
Float[] speedLimitsKmhPos = new Float[]{0f, 5f, 7f, 10f, 15f, 20f};
Float[] speedLimitsMphPos = new Float[]{0f, 3f, 5f, 7f, 10f, 15f};
if (settings.METRIC_SYSTEM.get() == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) {
Float[] speedLimitsKm = new Float[]{-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
Float[] speedLimitsKmPos = new Float[]{0f, 5f, 7f, 10f, 15f, 20f};
String[] speedNames = new String[speedLimitsKm.length];
String[] speedNamesPos = new String[speedLimitsKmPos.length];
for (int i = 0; i < speedLimitsKm.length; i++) {
speedNames[i] = speedLimitsKm[i].intValue() + " " + getString(R.string.km_h);
String[] speedNames = new String[speedLimitsKmh.length];
String[] speedNamesPos = new String[speedLimitsKmhPos.length];
for (int i = 0; i < speedLimitsKmh.length; i++) {
speedNames[i] = speedLimitsKmh[i].intValue() + " " + getString(R.string.km_h);
}
for (int i = 0; i < speedLimitsKmPos.length; i++) {
speedNamesPos[i] = speedLimitsKmPos[i].intValue() + " " + getString(R.string.km_h);
for (int i = 0; i < speedLimitsKmhPos.length; i++) {
speedNamesPos[i] = speedLimitsKmhPos[i].intValue() + " " + getString(R.string.km_h);
}
registerListPreference(settings.SPEED_LIMIT_EXCEED, screen, speedNames, speedLimitsKm);
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS, screen, speedNamesPos, speedLimitsKmPos);
registerListPreference(settings.SPEED_LIMIT_EXCEED_KMH, screen, speedNames, speedLimitsKmh);
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH, screen, speedNamesPos, speedLimitsKmhPos);
} else {
Float[] speedLimitsMiles = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
Float[] speedLimitsMilesPos = new Float[]{0f, 3f, 5f, 7f, 10f, 15f};
String[] speedNames = new String[speedLimitsMiles.length];
String[] speedNames = new String[speedLimitsMph.length];
String[] speedNamesPos = new String[speedLimitsMphPos.length];
for (int i = 0; i < speedNames.length; i++) {
speedNames[i] = speedLimitsMiles[i].intValue() + " " + getString(R.string.mile_per_hour);
speedNames[i] = speedLimitsMph[i].intValue() + " " + getString(R.string.mile_per_hour);
}
String[] speedNamesPos = new String[speedLimitsMilesPos.length];
for (int i = 0; i < speedNamesPos.length; i++) {
speedNamesPos[i] = speedLimitsMiles[i].intValue() + " " + getString(R.string.mile_per_hour);
speedNamesPos[i] = speedLimitsMphPos[i].intValue() + " " + getString(R.string.mile_per_hour);
}
registerListPreference(settings.SPEED_LIMIT_EXCEED, screen, speedNames, speedLimitsMiles);
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS, screen, speedNamesPos, speedLimitsMilesPos);
registerListPreference(settings.SPEED_LIMIT_EXCEED_KMH, screen, speedNames, speedLimitsKmh);
registerListPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH, screen, speedNamesPos, speedLimitsKmhPos);
}
PreferenceCategory category = (PreferenceCategory) screen.findPreference("guidance_preferences");

View file

@ -659,8 +659,8 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
if (isRecording()) {
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
if (!configureMenu && isRecording()) {
return;
}
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.recording_context_menu_arecord, app)

View file

@ -128,7 +128,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
headingChanged = Math.abs(MapUtils.degreesDiff(prevHeading, heading)) > 1.0;
}
if (mapView != null) {
float speedForDirectionOfMovement = settings.SWITCH_MAP_DIRECTION_TO_COMPASS.get()/3.6f;
float speedForDirectionOfMovement = settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH.get()/3.6f;
boolean smallSpeedForDirectionOfMovement = speedForDirectionOfMovement != 0 &&
myLocation != null && isSmallSpeedForDirectionOfMovement(myLocation, speedForDirectionOfMovement);
if ((settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS || (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING && smallSpeedForDirectionOfMovement)) && !routePlanningMode) {
@ -187,7 +187,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
zoom = autozoom(tb, location);
}
int currentMapRotation = settings.ROTATE_MAP.get();
float speedForDirectionOfMovement = settings.SWITCH_MAP_DIRECTION_TO_COMPASS.get()/3.6f;
float speedForDirectionOfMovement = settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH.get()/3.6f;
boolean smallSpeedForDirectionOfMovement = speedForDirectionOfMovement != 0
&& isSmallSpeedForDirectionOfMovement(location, speedForDirectionOfMovement);
boolean smallSpeedForCompass = isSmallSpeedForCompass(location);

View file

@ -603,7 +603,7 @@ public class ConfigureMapMenu {
}
}
public static String[] mapNamesIds = new String[]{"", "en", "af", "als", "ar", "az", "be", "ber", "bg", "bn", "bpy", "br", "bs", "ca", "ceb", "cs", "cy", "da", "de", "el", "eo", "es", "et", "eu", "fa", "fi", "fr", "fy", "ga", "gl", "he", "hi", "hsb", "hr", "ht", "hu", "hy", "id", "is", "it", "ja", "ka", "kab", "ko", "ku", "la", "lb", "lo", "lt", "lv", "mk", "ml", "mr", "ms", "nds", "new", "nl", "nn", "no", "nv", "oc", "os", "pl", "pms", "pt", "ro", "ru", "sc", "sh", "sk", "sl", "sq", "sr", "sv", "sw", "ta", "te", "th", "tl", "tr", "uk", "vi", "vo", "zh"};
public static String[] mapNamesIds = new String[]{"", "en", "af", "als", "ar", "az", "be", "ber", "bg", "bn", "bpy", "br", "bs", "ca", "ceb", "cs", "cy", "da", "de", "el", "eo", "es", "et", "eu", "fa", "fi", "fr", "fy", "ga", "gl", "he", "hi", "hsb", "hr", "ht", "hu", "hy", "id", "is", "it", "ja", "ka", "kab", "kn", "ko", "ku", "la", "lb", "lo", "lt", "lv", "mk", "ml", "mr", "ms", "nds", "new", "nl", "nn", "no", "nv", "oc", "os", "pl", "pms", "pt", "ro", "ru", "sc", "sh", "sk", "sl", "sq", "sr", "sv", "sw", "ta", "te", "th", "tl", "tr", "uk", "vi", "vo", "zh"};
public static String[] getSortedMapNamesIds(Context ctx, String[] ids, String[] values) {
final Map<String, String> mp = new HashMap<>();
@ -1140,4 +1140,4 @@ public class ConfigureMapMenu {
label.setTextColor(ContextCompat.getColorStateList(getContext(), colorId));
}
}
}
}

View file

@ -196,7 +196,7 @@ public class WaypointHelper {
public AlarmInfo getMostImportantAlarm(OsmandSettings.SpeedConstants sc, boolean showCameras) {
Location lastProjection = app.getRoutingHelper().getLastProjection();
float mxspeed = route.getCurrentMaxSpeed();
float delta = app.getSettings().SPEED_LIMIT_EXCEED.get() / 3.6f;
float delta = app.getSettings().SPEED_LIMIT_EXCEED_KMH.get() / 3.6f;
AlarmInfo speedAlarm = createSpeedAlarm(sc, mxspeed, lastProjection, delta);
if (speedAlarm != null) {
getVoiceRouter().announceSpeedAlarm(speedAlarm.getIntValue(), lastProjection.getSpeed());
@ -293,7 +293,7 @@ public class WaypointHelper {
public AlarmInfo calculateMostImportantAlarm(RouteDataObject ro, Location loc, MetricsConstants mc,
OsmandSettings.SpeedConstants sc, boolean showCameras) {
float mxspeed = ro.getMaximumSpeed(ro.bearingVsRouteDirection(loc));
float delta = app.getSettings().SPEED_LIMIT_EXCEED.get() / 3.6f;
float delta = app.getSettings().SPEED_LIMIT_EXCEED_KMH.get() / 3.6f;
AlarmInfo speedAlarm = createSpeedAlarm(sc, mxspeed, loc, delta);
if (speedAlarm != null) {
getVoiceRouter().announceSpeedAlarm(speedAlarm.getIntValue(), loc.getSpeed());

View file

@ -1070,8 +1070,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) {
layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity);
}
mapActivity.getMapActions().addActionsToAdapter(configure ? 0 : latLon.getLatitude(), configure ? 0 : latLon.getLongitude(), menuAdapter, getObject(), configure);
}
mapActivity.getMapActions().addActionsToAdapter(configure ? 0 : latLon.getLatitude(), configure ? 0 : latLon.getLongitude(), menuAdapter, configure ? null : getObject(), configure); }
return menuAdapter;
}

View file

@ -46,6 +46,7 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter;
import net.osmand.plus.widgets.FlowLayout;
@ -726,6 +727,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
public void setCategory(String name, int color) {
setSelectedItemWithScroll(name);
updateColorSelector(color, groupRecyclerView.getRootView());
AndroidUiHelper.updateVisibility(addToHiddenGroupInfo, !isCategoryVisible(name));
}
private void setSelectedItemWithScroll(String name) {
@ -952,7 +954,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
int previousSelectedPosition = getItemPosition(selectedItemName);
selectedItemName = items.get(holder.getAdapterPosition());
updateColorSelector(getCategoryColor(selectedItemName), groupRecyclerView.getRootView());
addToHiddenGroupInfo.setVisibility(isCategoryVisible(selectedItemName) ? View.GONE : View.VISIBLE);
AndroidUiHelper.updateVisibility(addToHiddenGroupInfo, !isCategoryVisible(selectedItemName));
notifyItemChanged(holder.getAdapterPosition());
notifyItemChanged(previousSelectedPosition);
}

View file

@ -731,8 +731,15 @@ public class MeasurementEditingContext {
Pair<WptPt, WptPt> pair = new Pair<>(before.points.get(i), before.points.get(i + 1));
RoadSegmentData data = this.roadSegmentData.get(pair);
if (data != null) {
LocationsHolder locationsHolder = new LocationsHolder(data.points);
locations.addAll(locationsHolder.getLocationsList());
for (WptPt pt : data.points) {
Location l = new Location("");
l.setLatitude(pt.getLatitude());
l.setLongitude(pt.getLongitude());
if (!Double.isNaN(pt.ele)) {
l.setAltitude(pt.ele);
}
locations.add(l);
}
pair.second.setTrkPtIndex(locations.size() - 1);
if (i < size - 2) {
locations.remove(locations.size() - 1);

View file

@ -275,21 +275,31 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
mainView.findViewById(R.id.apply_move_point_button).setOnClickListener(new OnClickListener() {
View applyMovePointButton = mainView.findViewById(R.id.apply_move_point_button);
UiUtilities.setupDialogButton(nightMode, applyMovePointButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_apply);
applyMovePointButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
applyMovePointMode();
}
});
mainView.findViewById(R.id.apply_point_before_after_point_button).setOnClickListener(new OnClickListener() {
View applyPointBeforeAfterButton = mainView.findViewById(R.id.apply_point_before_after_point_button);
UiUtilities.setupDialogButton(nightMode, applyPointBeforeAfterButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_apply);
applyPointBeforeAfterButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
applyAddPointBeforeAfterMode();
}
});
mainView.findViewById(R.id.add_point_before_after_button).setOnClickListener(new OnClickListener() {
View addPointBeforeAfterButton = mainView.findViewById(R.id.add_point_before_after_button);
UiUtilities.setupDialogButton(nightMode, addPointBeforeAfterButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_add);
addPointBeforeAfterButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
addPointBeforeAfter();
@ -334,7 +344,10 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
}
});
mainView.findViewById(R.id.add_point_button).setOnClickListener(new OnClickListener() {
View addPointButton = mainView.findViewById(R.id.add_point_button);
UiUtilities.setupDialogButton(nightMode, addPointButton, UiUtilities.DialogButtonType.PRIMARY,
R.string.shared_string_add);
addPointButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
addCenterPoint();
@ -2039,8 +2052,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
int paddingH = ctx.getResources().getDimensionPixelSize(R.dimen.context_menu_padding_margin_large);
int paddingV = ctx.getResources().getDimensionPixelSize(R.dimen.context_menu_padding_margin_small);
done.setPadding(paddingH, paddingV, paddingH, paddingV);
AndroidUtils.setBackground(ctx, done, nightMode, R.drawable.dlg_btn_stroked_light,
R.drawable.dlg_btn_stroked_dark);
AndroidUtils.setBackground(ctx, done, nightMode, R.drawable.purchase_dialog_outline_btn_bg_light,
R.drawable.purchase_dialog_outline_btn_bg_dark);
}
@Override

View file

@ -121,7 +121,7 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
BaseBottomSheetItem directions = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_gdirections_dark))
.setTitle(getString(R.string.get_directions))
.setLayoutId(R.layout.bottom_sheet_item_simple)
.setLayoutId(R.layout.bottom_sheet_item_simple_pad_32dp)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -138,7 +138,7 @@ public class OptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragm
BaseBottomSheetItem reverse = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_change_navigation_points))
.setTitle(getString(R.string.reverse_route))
.setLayoutId(R.layout.bottom_sheet_item_simple)
.setLayoutId(R.layout.bottom_sheet_item_simple_pad_32dp)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View file

@ -1,31 +1,24 @@
package net.osmand.plus.measurementtool;
import android.app.Dialog;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.base.BottomSheetDialogFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.settings.backend.ApplicationMode;
import org.apache.commons.logging.Log;
@ -37,7 +30,7 @@ import static net.osmand.plus.UiUtilities.CustomRadioButtonType.LEFT;
import static net.osmand.plus.UiUtilities.CustomRadioButtonType.RIGHT;
import static net.osmand.plus.measurementtool.MeasurementEditingContext.DEFAULT_APP_MODE;
public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDialogFragment {
public class RouteBetweenPointsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment {
private static final Log LOG = PlatformUtil.getLog(RouteBetweenPointsBottomSheetDialogFragment.class);
public static final String TAG = RouteBetweenPointsBottomSheetDialogFragment.class.getSimpleName();
@ -47,7 +40,6 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDial
public static final String ROUTE_APP_MODE_KEY = "route_app_mode";
private boolean nightMode;
private boolean portrait;
private TextView btnDescription;
private RouteBetweenPointsDialogType dialogType = RouteBetweenPointsDialogType.WHOLE_ROUTE_CALCULATION;
private RouteBetweenPointsDialogMode defaultDialogMode = RouteBetweenPointsDialogMode.SINGLE;
@ -66,95 +58,6 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDial
ALL,
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Bundle args = getArguments();
if (args != null) {
appMode = ApplicationMode.valueOfStringKey(args.getString(ROUTE_APP_MODE_KEY), null);
dialogType = (RouteBetweenPointsDialogType) args.get(DIALOG_TYPE_KEY);
defaultDialogMode = (RouteBetweenPointsDialogMode) args.get(DEFAULT_DIALOG_MODE_KEY);
}
if (savedInstanceState != null) {
dialogType = (RouteBetweenPointsDialogType) savedInstanceState.get(DIALOG_TYPE_KEY);
defaultDialogMode = (RouteBetweenPointsDialogMode) savedInstanceState.get(DEFAULT_DIALOG_MODE_KEY);
}
OsmandApplication app = requiredMyApplication();
nightMode = app.getDaynightHelper().isNightModeForMapControls();
FragmentActivity activity = requireActivity();
portrait = AndroidUiHelper.isOrientationPortrait(activity);
final View mainView = UiUtilities.getInflater(getContext(), nightMode)
.inflate(R.layout.fragment_route_between_points_bottom_sheet_dialog,
container, false);
AndroidUtils.setBackground(activity, mainView, nightMode,
portrait ? R.drawable.bg_bottom_menu_light : R.drawable.bg_bottom_sheet_topsides_landscape_light,
portrait ? R.drawable.bg_bottom_menu_dark : R.drawable.bg_bottom_sheet_topsides_landscape_dark);
View cancelButton = mainView.findViewById(R.id.dismiss_button);
UiUtilities.setupDialogButton(nightMode, cancelButton, UiUtilities.DialogButtonType.SECONDARY,
R.string.shared_string_close);
mainView.findViewById(R.id.dismiss_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dismiss();
}
});
customRadioButton = mainView.findViewById(R.id.custom_radio_buttons);
TextView singleModeButton = mainView.findViewById(R.id.left_button);
singleModeButton.setText(getButtonText(RouteBetweenPointsDialogMode.SINGLE));
TextView allModeButton = mainView.findViewById(R.id.right_button);
allModeButton.setText(getButtonText(RouteBetweenPointsDialogMode.ALL));
btnDescription = mainView.findViewById(R.id.button_description);
LinearLayout navigationType = mainView.findViewById(R.id.navigation_types_container);
final List<ApplicationMode> modes = new ArrayList<>(ApplicationMode.values(app));
modes.remove(ApplicationMode.DEFAULT);
View.OnClickListener onClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
ApplicationMode mode = DEFAULT_APP_MODE;
if ((int) view.getTag() != STRAIGHT_LINE_TAG) {
mode = modes.get((int) view.getTag());
}
Fragment fragment = getTargetFragment();
if (fragment instanceof RouteBetweenPointsFragmentListener) {
((RouteBetweenPointsFragmentListener) fragment).onChangeApplicationMode(mode, dialogType, defaultDialogMode);
}
dismiss();
}
};
Drawable icon = app.getUIUtilities().getIcon(R.drawable.ic_action_split_interval, nightMode);
addProfileView(navigationType, onClickListener, STRAIGHT_LINE_TAG, icon,
app.getText(R.string.routing_profile_straightline), appMode == DEFAULT_APP_MODE);
addDelimiterView(navigationType);
for (int i = 0; i < modes.size(); i++) {
ApplicationMode mode = modes.get(i);
if (!"public_transport".equals(mode.getRoutingProfile())) {
icon = app.getUIUtilities().getIcon(mode.getIconRes(), mode.getIconColorInfo().getColor(nightMode));
addProfileView(navigationType, onClickListener, i, icon, mode.toHumanString(), mode.equals(appMode));
}
}
singleModeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setDefaultDialogMode(RouteBetweenPointsDialogMode.SINGLE);
}
});
allModeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setDefaultDialogMode(RouteBetweenPointsDialogMode.ALL);
}
});
updateModeButtons();
return mainView;
}
private String getButtonText(RouteBetweenPointsDialogMode dialogMode) {
switch (dialogType) {
case WHOLE_ROUTE_CALCULATION:
@ -251,17 +154,80 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDial
}
@Override
public void onStart() {
super.onStart();
if (!portrait) {
Dialog dialog = getDialog();
if (dialog != null && dialog.getWindow() != null) {
Window window = dialog.getWindow();
WindowManager.LayoutParams params = window.getAttributes();
params.width = dialog.getContext().getResources().getDimensionPixelSize(R.dimen.landscape_bottom_sheet_dialog_fragment_width);
window.setAttributes(params);
public void createMenuItems(Bundle savedInstanceState) {
Bundle args = getArguments();
if (args != null) {
appMode = ApplicationMode.valueOfStringKey(args.getString(ROUTE_APP_MODE_KEY), null);
dialogType = (RouteBetweenPointsDialogType) args.get(DIALOG_TYPE_KEY);
defaultDialogMode = (RouteBetweenPointsDialogMode) args.get(DEFAULT_DIALOG_MODE_KEY);
}
if (savedInstanceState != null) {
dialogType = (RouteBetweenPointsDialogType) savedInstanceState.get(DIALOG_TYPE_KEY);
defaultDialogMode = (RouteBetweenPointsDialogMode) savedInstanceState.get(DEFAULT_DIALOG_MODE_KEY);
}
OsmandApplication app = requiredMyApplication();
nightMode = app.getDaynightHelper().isNightModeForMapControls();
final View mainView = UiUtilities.getInflater(getContext(), nightMode)
.inflate(R.layout.fragment_route_between_points_bottom_sheet_dialog,
null, false);
customRadioButton = mainView.findViewById(R.id.custom_radio_buttons);
TextView singleModeButton = mainView.findViewById(R.id.left_button);
singleModeButton.setText(getButtonText(RouteBetweenPointsDialogMode.SINGLE));
TextView allModeButton = mainView.findViewById(R.id.right_button);
allModeButton.setText(getButtonText(RouteBetweenPointsDialogMode.ALL));
btnDescription = mainView.findViewById(R.id.button_description);
LinearLayout navigationType = mainView.findViewById(R.id.navigation_types_container);
final List<ApplicationMode> modes = new ArrayList<>(ApplicationMode.values(app));
modes.remove(ApplicationMode.DEFAULT);
View.OnClickListener onClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
ApplicationMode mode = DEFAULT_APP_MODE;
if ((int) view.getTag() != STRAIGHT_LINE_TAG) {
mode = modes.get((int) view.getTag());
}
Fragment fragment = getTargetFragment();
if (fragment instanceof RouteBetweenPointsFragmentListener) {
((RouteBetweenPointsFragmentListener) fragment).onChangeApplicationMode(mode, dialogType, defaultDialogMode);
}
dismiss();
}
};
Drawable icon = app.getUIUtilities().getIcon(R.drawable.ic_action_split_interval, nightMode);
addProfileView(navigationType, onClickListener, STRAIGHT_LINE_TAG, icon,
app.getText(R.string.routing_profile_straightline), appMode == DEFAULT_APP_MODE);
addDelimiterView(navigationType);
for (int i = 0; i < modes.size(); i++) {
ApplicationMode mode = modes.get(i);
if (!"public_transport".equals(mode.getRoutingProfile())) {
icon = app.getUIUtilities().getIcon(mode.getIconRes(), mode.getIconColorInfo().getColor(nightMode));
addProfileView(navigationType, onClickListener, i, icon, mode.toHumanString(), mode.equals(appMode));
}
}
singleModeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setDefaultDialogMode(RouteBetweenPointsDialogMode.SINGLE);
}
});
allModeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setDefaultDialogMode(RouteBetweenPointsDialogMode.ALL);
}
});
updateModeButtons();
items.add(new BaseBottomSheetItem.Builder().setCustomView(mainView).create());
}
@Override
protected int getDismissButtonTextId() {
return R.string.shared_string_close;
}
@Override

View file

@ -219,7 +219,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
final double latitude,
final double longitude,
ContextMenuAdapter adapter,
final Object selectedObj) {
final Object selectedObj, boolean configureMenu) {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {

View file

@ -230,7 +230,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(final MapActivity mapActivity,
final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
ItemClickListener addListener = new ItemClickListener() {
@Override

View file

@ -400,37 +400,45 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(MapActivity mapActivity,
final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);
if (mapActivity.getMapView().getMainLayer() instanceof MapTileLayer) {
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
MapActivity mapActivity = mapActivityRef.get();
if (mapActivity != null && !mapActivity.isFinishing()) {
OsmandMapTileView mapView = mapActivity.getMapView();
if (resId == R.string.context_menu_item_update_map) {
mapActivity.getMapActions().reloadTile(mapView.getZoom(), latitude, longitude);
} else if (resId == R.string.shared_string_download_map) {
DownloadTilesDialog dlg = new DownloadTilesDialog(mapActivity, (OsmandApplication) mapActivity.getApplication(), mapView);
dlg.openDialog();
}
}
return true;
}
};
adapter.addItem(new ContextMenuItem.ItemBuilder()
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
boolean mapTileLayer = mapActivity.getMapView().getMainLayer() instanceof MapTileLayer;
if (configureMenu || mapTileLayer) {
ContextMenuItem.ItemBuilder updateMapItemBuilder = new ContextMenuItem.ItemBuilder()
.setTitleId(R.string.context_menu_item_update_map, mapActivity)
.setId(MAP_CONTEXT_MENU_UPDATE_MAP)
.setIcon(R.drawable.ic_action_refresh_dark)
.setOrder(UPDATE_MAP_ITEM_ORDER)
.setListener(listener).createItem());
adapter.addItem(new ContextMenuItem.ItemBuilder()
.setOrder(UPDATE_MAP_ITEM_ORDER);
ContextMenuItem.ItemBuilder downloadMapItemBuilder = new ContextMenuItem.ItemBuilder()
.setTitleId(R.string.shared_string_download_map, mapActivity)
.setId(MAP_CONTEXT_MENU_DOWNLOAD_MAP)
.setIcon(R.drawable.ic_action_import)
.setOrder(DOWNLOAD_MAP_ITEM_ORDER)
.setListener(listener).createItem());
.setOrder(DOWNLOAD_MAP_ITEM_ORDER);
if (mapTileLayer) {
final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {
MapActivity mapActivity = mapActivityRef.get();
if (mapActivity != null && !mapActivity.isFinishing()) {
OsmandMapTileView mapView = mapActivity.getMapView();
if (resId == R.string.context_menu_item_update_map) {
mapActivity.getMapActions().reloadTile(mapView.getZoom(), latitude, longitude);
} else if (resId == R.string.shared_string_download_map) {
DownloadTilesDialog dlg = new DownloadTilesDialog(mapActivity, (OsmandApplication) mapActivity.getApplication(), mapView);
dlg.openDialog();
}
}
return true;
}
};
updateMapItemBuilder.setListener(listener);
downloadMapItemBuilder.setListener(listener);
}
adapter.addItem(updateMapItemBuilder.createItem());
adapter.addItem(downloadMapItemBuilder.createItem());
}
}

View file

@ -1790,7 +1790,7 @@ public class OsmandSettings {
public final OsmandPreference<Float> ARRIVAL_DISTANCE_FACTOR =
new FloatPreference("arrival_distance_factor", 1f).makeProfile();
public final OsmandPreference<Float> SPEED_LIMIT_EXCEED =
public final OsmandPreference<Float> SPEED_LIMIT_EXCEED_KMH =
new FloatPreference("speed_limit_exceed", 5f).makeProfile();
public final CommonPreference<Float> DEFAULT_SPEED = new FloatPreference("default_speed", 10f).makeProfile().cache();
@ -1873,7 +1873,7 @@ public class OsmandSettings {
public final CommonPreference<Integer> APP_MODE_ORDER = new IntPreference("app_mode_order", 0).makeProfile().cache();
public final OsmandPreference<Float> SWITCH_MAP_DIRECTION_TO_COMPASS =
public final OsmandPreference<Float> SWITCH_MAP_DIRECTION_TO_COMPASS_KMH =
new FloatPreference("speed_for_map_to_direction_of_movement", 0f).makeProfile();
// this value string is synchronized with settings_pref.xml preference name

View file

@ -74,28 +74,24 @@ public class MapDuringNavigationFragment extends BaseSettingsFragment {
}
private void setupMapDirectionToCompassPref() {
String[] entries;
Float[] entryValues;
//array size must be equal!
Float[] valuesKmh = new Float[]{0f, 5f, 7f, 10f, 15f, 20f};
Float[] valuesMph = new Float[]{0f, 3f, 5f, 7f, 10f, 15f};
String[] names;
if (settings.METRIC_SYSTEM.getModeValue(getSelectedAppMode()) == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) {
entryValues = new Float[] {0f, 5f, 7f, 10f, 15f, 20f};
entries = new String[entryValues.length];
for (int i = 0; i < entryValues.length; i++) {
entries[i] = entryValues[i].intValue() + " " + getString(R.string.km_h);
names = new String[valuesKmh.length];
for (int i = 0; i < names.length; i++) {
names[i] = valuesKmh[i].intValue() + " " + getString(R.string.km_h);
}
} else {
Float[] speedLimitsMiles = new Float[] {-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
entryValues = new Float[] {0f, 3f, 5f, 7f, 10f, 15f};
entries = new String[entryValues.length];
for (int i = 0; i < entries.length; i++) {
entries[i] = speedLimitsMiles[i].intValue() + " " + getString(R.string.mile_per_hour);
names = new String[valuesMph.length];
for (int i = 0; i < names.length; i++) {
names[i] = valuesMph[i].intValue() + " " + getString(R.string.mile_per_hour);
}
}
ListPreferenceEx switchMapDirectionToCompass = (ListPreferenceEx) findPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS.getId());
switchMapDirectionToCompass.setEntries(entries);
switchMapDirectionToCompass.setEntryValues(entryValues);
ListPreferenceEx switchMapDirectionToCompass = (ListPreferenceEx) findPreference(settings.SWITCH_MAP_DIRECTION_TO_COMPASS_KMH.getId());
switchMapDirectionToCompass.setEntries(names);
switchMapDirectionToCompass.setEntryValues(valuesKmh);
}
@Override

View file

@ -103,28 +103,24 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment implements OnPr
}
private void setupSpeedLimitExceedPref() {
Float[] speedLimitValues;
String[] speedLimitNames;
//array size must be equal!
Float[] valuesKmh = new Float[]{-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
Float[] valuesMph = new Float[]{-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
String[] names;
if (settings.METRIC_SYSTEM.getModeValue(getSelectedAppMode()) == OsmandSettings.MetricsConstants.KILOMETERS_AND_METERS) {
speedLimitValues = new Float[] {-10f, -7f, -5f, 0f, 5f, 7f, 10f, 15f, 20f};
speedLimitNames = new String[speedLimitValues.length];
for (int i = 0; i < speedLimitValues.length; i++) {
speedLimitNames[i] = speedLimitValues[i].intValue() + " " + getString(R.string.km_h);
names = new String[valuesKmh.length];
for (int i = 0; i < names.length; i++) {
names[i] = valuesKmh[i].intValue() + " " + getString(R.string.km_h);
}
} else {
speedLimitValues = new Float[] {-7f, -5f, -3f, 0f, 3f, 5f, 7f, 10f, 15f};
speedLimitNames = new String[speedLimitValues.length];
for (int i = 0; i < speedLimitNames.length; i++) {
speedLimitNames[i] = speedLimitValues[i].intValue() + " " + getString(R.string.mile_per_hour);
names = new String[valuesMph.length];
for (int i = 0; i < names.length; i++) {
names[i] = valuesMph[i].intValue() + " " + getString(R.string.mile_per_hour);
}
}
ListPreferenceEx voiceProvider = (ListPreferenceEx) findPreference(settings.SPEED_LIMIT_EXCEED.getId());
voiceProvider.setEntries(speedLimitNames);
voiceProvider.setEntryValues(speedLimitValues);
ListPreferenceEx voiceProvider = (ListPreferenceEx) findPreference(settings.SPEED_LIMIT_EXCEED_KMH.getId());
voiceProvider.setEntries(names);
voiceProvider.setEntryValues(valuesKmh);
}
private void setupKeepInformingPref() {