feat: масштабный рефакторинг архитектуры AIS карты и UI компонентов

Новые векторные иконки:
- cog.xml: иконка шестеренки для настроек
- compass.xml: иконка компаса для навигации
- ownship.xml: иконка собственного судна
- targetlist.xml: иконка списка целей с текстом 'LIST'

Архитектурные изменения:
- MainActivity.java: +99/- строк - обновление UI логики
- AppController.java: +111/- строк - рефакторинг контроллера приложения
- MapLibreMapImpl.java: +525/- строк - значительные улучшения карты
- MapInterface.java: +10 строк - расширение интерфейса карты
- CursorOverlay.java: +329/- строк - улучшение курсора и оверлеев
- GeoUtils.java: +92 строк - новые гео-утилиты
- NavigationUtils.java: +81/- строк - оптимизация навигации
- VesselPathTracker.java: +18/- строк - улучшение трекинга судов
- MapForgeImpl.java, YandexMapImpl.java: обновления карт

UI изменения:
- activity_main.xml: +65/- строк - обновление главного layout
- cursor.xml: +16/- строк - улучшение курсора
- targetlist.xml: +39 строк - обновление иконки списка целей

Общий объем: +1087/-328 строк
Подготовка к новой архитектуре UI и картографических компонентов
This commit is contained in:
2025-10-06 08:33:13 +03:00
parent 932ca5f05f
commit 982e940b8d
23 changed files with 1680 additions and 329 deletions
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#80000000" />
<size
android:width="40dp"
android:height="40dp" />
</shape>
+11
View File
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="236dp"
android:height="236dp"
android:viewportWidth="236"
android:viewportHeight="236">
<path
android:pathData="M226.29,89.5h-19.67c-7.31,0 -10.97,-8.84 -5.8,-14.01l13.91,-13.91c3.21,-3.21 3.21,-8.4 0,-11.61l-28.7,-28.7c-3.21,-3.21 -8.4,-3.21 -11.61,0l-13.91,13.91c-5.17,5.17 -14.01,1.51 -14.01,-5.8V9.71c0,-4.53 -3.67,-8.21 -8.21,-8.21h-40.58c-4.53,0 -8.21,3.67 -8.21,8.21v19.67c0,7.31 -8.84,10.97 -14.01,5.8l-13.91,-13.91c-3.21,-3.21 -8.4,-3.21 -11.61,0l-28.7,28.7c-3.21,3.21 -3.21,8.4 0,11.61l13.91,13.91c5.17,5.17 1.51,14.01 -5.8,14.01H9.71c-4.53,0 -8.21,3.67 -8.21,8.21v40.58c0,4.53 3.67,8.21 8.21,8.21h19.67c7.31,0 10.97,8.84 5.8,14.01l-13.91,13.91c-3.21,3.21 -3.21,8.4 0,11.61l28.7,28.7c3.21,3.21 8.4,3.21 11.61,0l13.91,-13.91c5.17,-5.17 14.01,-1.51 14.01,5.8v19.67c0,4.53 3.67,8.21 8.21,8.21h40.58c4.53,0 8.21,-3.67 8.21,-8.21v-19.67c0,-7.31 8.84,-10.97 14.01,-5.8l13.91,13.91c3.21,3.21 8.4,3.21 11.61,0l28.7,-28.7c3.21,-3.21 3.21,-8.4 0,-11.61l-13.91,-13.91c-5.17,-5.17 -1.51,-14.01 5.8,-14.01h19.67c4.53,0 8.21,-3.67 8.21,-8.21v-40.58c0,-4.53 -3.67,-8.21 -8.21,-8.21ZM118.5,158.5c-22.09,0 -40,-17.91 -40,-40s17.91,-40 40,-40 40,17.91 40,40 -17.91,40 -40,40Z"
android:strokeWidth="3"
android:fillColor="#666"
android:strokeColor="#000"/>
</vector>
+16
View File
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="66.46dp"
android:height="176.77dp"
android:viewportWidth="66.46"
android:viewportHeight="176.77">
<path
android:strokeWidth="1"
android:pathData="M33.73,64.39c12.24,0 22.33,9.16 23.81,21h8.19L33.23,1.39 0.73,85.39h9.19c1.48,-11.84 11.57,-21 23.81,-21Z"
android:fillColor="#e32636"
android:strokeColor="#961923"/>
<path
android:strokeWidth="1"
android:pathData="M57.04,91.39c-1.48,11.84 -11.57,21 -23.81,21s-22.33,-9.16 -23.81,-21H0.73l32.5,84 32.5,-84h-8.69Z"
android:fillColor="#c0c0c0"
android:strokeColor="#f3f3f3"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="92.09dp"
android:height="199.81dp"
android:viewportWidth="92.09"
android:viewportHeight="199.81">
<path
android:pathData="M44.03,168.47c15.02,0 27.22,12.04 27.49,27l15.45,2.61 3.19,-23.41c0.89,-6.53 0.41,-13.17 -1.39,-19.5L46.03,5.47 3.33,155.13c-1.81,6.36 -2.28,13.02 -1.38,19.57l3.2,23.26 11.4,-2.5c0.27,-14.96 12.47,-27 27.49,-27Z"
android:strokeWidth="3"
android:fillColor="#d2ff1a"
android:strokeColor="#a8cc14"/>
</vector>
+69
View File
@@ -0,0 +1,69 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="233.17dp"
android:height="233.87dp"
android:viewportWidth="233.17"
android:viewportHeight="233.87">
<group>
<clip-path
android:pathData="M0,0h233.17v233.87h-233.17z"/>
<path
android:fillColor="#FF000000"
android:strokeWidth="1"
android:pathData="M26.7,0.5L207.3,0.5A26.2,26.2 0,0 1,233.5 26.7L233.5,27.3A26.2,26.2 0,0 1,207.3 53.5L26.7,53.5A26.2,26.2 0,0 1,0.5 27.3L0.5,26.7A26.2,26.2 0,0 1,26.7 0.5z"
android:strokeColor="#000"/>
<path
android:fillColor="#FF000000"
android:strokeWidth="1"
android:pathData="M26.7,60.39L207.3,60.39A26.2,26.2 0,0 1,233.5 86.59L233.5,87.19A26.2,26.2 0,0 1,207.3 113.39L26.7,113.39A26.2,26.2 0,0 1,0.5 87.19L0.5,86.59A26.2,26.2 0,0 1,26.7 60.39z"
android:strokeColor="#000"/>
<path
android:fillColor="#FF000000"
android:strokeWidth="1"
android:pathData="M26.7,120.28L207.3,120.28A26.2,26.2 0,0 1,233.5 146.48L233.5,147.08A26.2,26.2 0,0 1,207.3 173.28L26.7,173.28A26.2,26.2 0,0 1,0.5 147.08L0.5,146.48A26.2,26.2 0,0 1,26.7 120.28z"
android:strokeColor="#000"/>
<path
android:fillColor="#FF000000"
android:strokeWidth="1"
android:pathData="M26.7,180.17L207.3,180.17A26.2,26.2 0,0 1,233.5 206.37L233.5,206.97A26.2,26.2 0,0 1,207.3 233.17L26.7,233.17A26.2,26.2 0,0 1,0.5 206.97L0.5,206.37A26.2,26.2 0,0 1,26.7 180.17z"
android:strokeColor="#000"/>
</group>
<path
android:pathData="M89.21,29.73h0.09l4.98,-15.68h6.77v22.41h-5.12v-14.44l-0.09,-0.02 -4.86,14.45h-3.44l-4.77,-14.24 -0.09,0.02v14.22h-5.12V14.05h6.71l4.93,15.68Z"
android:fillColor="#fff"/>
<path
android:pathData="M116.2,29.73h0.09l4.98,-15.68h6.77v22.41h-5.12v-14.44l-0.09,-0.02 -4.86,14.45h-3.44l-4.77,-14.24 -0.09,0.02v14.22h-5.12V14.05h6.71l4.93,15.68Z"
android:fillColor="#fff"/>
<path
android:pathData="M142.92,30.52c0,-0.8 -0.26,-1.41 -0.77,-1.84s-1.45,-0.88 -2.8,-1.36c-2.73,-0.9 -4.77,-1.86 -6.09,-2.89 -1.33,-1.02 -1.99,-2.49 -1.99,-4.41s0.77,-3.4 2.32,-4.56c1.54,-1.16 3.51,-1.74 5.89,-1.74 2.51,0 4.54,0.6 6.07,1.79 1.53,1.2 2.28,2.88 2.23,5.06l-0.03,0.09h-4.96c0,-1.06 -0.28,-1.82 -0.85,-2.3 -0.57,-0.48 -1.42,-0.72 -2.56,-0.72 -0.93,0 -1.66,0.23 -2.19,0.69 -0.54,0.46 -0.8,1.03 -0.8,1.71s0.27,1.18 0.83,1.58c0.55,0.4 1.58,0.89 3.08,1.48 2.55,0.77 4.49,1.71 5.8,2.82 1.31,1.11 1.97,2.63 1.97,4.56s-0.76,3.51 -2.27,4.62 -3.52,1.67 -6.02,1.67 -4.6,-0.6 -6.33,-1.79c-1.73,-1.2 -2.57,-3.08 -2.52,-5.64l0.03,-0.09h4.98c0,1.3 0.32,2.23 0.95,2.78 0.63,0.55 1.6,0.82 2.9,0.82 1.07,0 1.87,-0.22 2.39,-0.65 0.52,-0.43 0.79,-1 0.79,-1.69Z"
android:fillColor="#fff"/>
<path
android:pathData="M156.24,36.46h-5.1V14.05h5.1v22.41Z"
android:fillColor="#fff"/>
<path
android:pathData="M104.15,87.67l0.03,0.09c0.04,2.51 -0.67,4.42 -2.13,5.71 -1.46,1.3 -3.52,1.94 -6.2,1.94s-4.91,-0.83 -6.56,-2.5c-1.65,-1.67 -2.48,-3.84 -2.48,-6.54v-4.6c0,-2.68 0.79,-4.86 2.38,-6.53 1.59,-1.67 3.69,-2.51 6.3,-2.51 2.79,0 4.96,0.65 6.49,1.95 1.53,1.3 2.27,3.19 2.23,5.68l-0.05,0.09h-4.98c0,-1.35 -0.29,-2.32 -0.86,-2.91 -0.58,-0.58 -1.52,-0.88 -2.83,-0.88 -1.15,0 -2.03,0.46 -2.65,1.39 -0.62,0.92 -0.92,2.15 -0.92,3.69v4.63c0,1.54 0.34,2.78 1.01,3.71 0.68,0.93 1.64,1.39 2.91,1.39 1.17,0 2.02,-0.29 2.54,-0.88 0.52,-0.58 0.78,-1.56 0.78,-2.94h4.98Z"
android:fillColor="#fff"/>
<path
android:pathData="M125.32,86.07c0,2.71 -0.86,4.95 -2.58,6.71 -1.72,1.76 -3.97,2.64 -6.74,2.64s-5.06,-0.88 -6.8,-2.64c-1.74,-1.76 -2.6,-4 -2.6,-6.71v-3.97c0,-2.7 0.87,-4.94 2.6,-6.71 1.73,-1.77 3.99,-2.65 6.77,-2.65s5.02,0.88 6.75,2.65c1.74,1.77 2.6,4 2.6,6.71v3.97ZM120.22,82.07c0,-1.57 -0.37,-2.87 -1.11,-3.88 -0.74,-1.01 -1.79,-1.51 -3.14,-1.51s-2.44,0.5 -3.17,1.51c-0.73,1 -1.1,2.3 -1.1,3.88v4c0,1.59 0.37,2.9 1.11,3.91 0.74,1.01 1.8,1.51 3.19,1.51s2.38,-0.5 3.12,-1.51c0.74,-1.01 1.1,-2.31 1.1,-3.91v-4Z"
android:fillColor="#fff"/>
<path
android:pathData="M145.85,92.06c-0.77,0.93 -1.85,1.72 -3.24,2.38 -1.39,0.66 -3.18,0.98 -5.37,0.98 -2.73,0 -4.96,-0.84 -6.66,-2.51 -1.71,-1.67 -2.56,-3.85 -2.56,-6.52v-4.6c0,-2.65 0.83,-4.82 2.49,-6.51 1.66,-1.69 3.8,-2.53 6.41,-2.53 2.82,0 4.94,0.63 6.38,1.88 1.44,1.26 2.13,2.97 2.08,5.15l-0.03,0.09h-4.8c0,-1.08 -0.29,-1.88 -0.86,-2.41 -0.58,-0.52 -1.44,-0.79 -2.6,-0.79s-2.15,0.47 -2.88,1.41 -1.09,2.16 -1.09,3.66v4.63c0,1.53 0.36,2.77 1.08,3.7 0.72,0.93 1.73,1.4 3.03,1.4 0.94,0 1.68,-0.08 2.22,-0.23 0.54,-0.15 0.97,-0.35 1.28,-0.61v-3.94h-3.91v-3.39h9.02v8.73Z"
android:fillColor="#fff"/>
<path
android:pathData="M98.85,151.26c0,-0.79 -0.26,-1.39 -0.77,-1.81 -0.51,-0.42 -1.45,-0.87 -2.8,-1.34 -2.73,-0.89 -4.77,-1.83 -6.09,-2.84 -1.33,-1 -1.99,-2.45 -1.99,-4.34s0.77,-3.34 2.32,-4.48c1.54,-1.14 3.51,-1.71 5.89,-1.71 2.51,0 4.54,0.59 6.07,1.76 1.53,1.18 2.28,2.83 2.23,4.97l-0.03,0.09h-4.96c0,-1.04 -0.28,-1.79 -0.85,-2.26 -0.57,-0.47 -1.42,-0.7 -2.56,-0.7 -0.93,0 -1.66,0.23 -2.19,0.68 -0.54,0.45 -0.8,1.01 -0.8,1.68s0.27,1.16 0.83,1.55c0.55,0.39 1.58,0.88 3.08,1.46 2.55,0.76 4.49,1.68 5.8,2.77 1.31,1.09 1.97,2.58 1.97,4.48s-0.76,3.45 -2.27,4.55c-1.51,1.09 -3.52,1.64 -6.02,1.64s-4.6,-0.59 -6.33,-1.76c-1.73,-1.18 -2.57,-3.02 -2.52,-5.55l0.03,-0.09h4.98c0,1.28 0.32,2.19 0.95,2.73 0.63,0.54 1.6,0.81 2.9,0.81 1.07,0 1.87,-0.21 2.39,-0.64 0.52,-0.42 0.79,-0.98 0.79,-1.67Z"
android:fillColor="#fff"/>
<path
android:pathData="M125.07,148.07c0,2.71 -0.86,4.95 -2.58,6.71 -1.72,1.76 -3.97,2.64 -6.74,2.64s-5.06,-0.88 -6.8,-2.64c-1.74,-1.76 -2.6,-4 -2.6,-6.71v-3.97c0,-2.7 0.87,-4.94 2.6,-6.71 1.73,-1.77 3.99,-2.65 6.77,-2.65s5.02,0.88 6.75,2.65c1.74,1.77 2.6,4 2.6,6.71v3.97ZM119.97,144.07c0,-1.57 -0.37,-2.87 -1.11,-3.88 -0.74,-1.01 -1.79,-1.51 -3.14,-1.51s-2.44,0.5 -3.17,1.51c-0.73,1 -1.1,2.3 -1.1,3.88v4c0,1.59 0.37,2.9 1.11,3.91 0.74,1.01 1.8,1.51 3.19,1.51s2.38,-0.5 3.12,-1.51c0.74,-1.01 1.1,-2.31 1.1,-3.91v-4Z"
android:fillColor="#fff"/>
<path
android:pathData="M145.59,154.06c-0.77,0.93 -1.85,1.72 -3.24,2.38 -1.39,0.66 -3.18,0.98 -5.37,0.98 -2.73,0 -4.96,-0.84 -6.66,-2.51 -1.71,-1.67 -2.56,-3.85 -2.56,-6.52v-4.6c0,-2.65 0.83,-4.82 2.49,-6.51 1.66,-1.69 3.8,-2.53 6.41,-2.53 2.82,0 4.94,0.63 6.38,1.88 1.44,1.26 2.13,2.97 2.08,5.15l-0.03,0.09h-4.8c0,-1.08 -0.29,-1.88 -0.86,-2.41 -0.58,-0.52 -1.44,-0.79 -2.6,-0.79s-2.15,0.47 -2.88,1.41 -1.09,2.16 -1.09,3.66v4.63c0,1.53 0.36,2.77 1.08,3.7 0.72,0.93 1.73,1.4 3.03,1.4 0.94,0 1.68,-0.08 2.22,-0.23 0.54,-0.15 0.97,-0.35 1.28,-0.61v-3.94h-3.91v-3.39h9.02v8.73Z"
android:fillColor="#fff"/>
<path
android:pathData="M104.08,208.1h-5.1v-4.3h5.1v4.3Z"
android:fillColor="#fff"/>
<path
android:pathData="M113.45,208.1h-5.1v-4.3h5.1v4.3Z"
android:fillColor="#fff"/>
<path
android:pathData="M122.82,208.1h-5.1v-4.3h5.1v4.3Z"
android:fillColor="#fff"/>
</vector>
+34 -29
View File
@@ -19,49 +19,54 @@
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_margin="16dp"
android:layout_marginEnd="8dp"
android:background="@android:color/transparent"
android:orientation="vertical"
android:padding="8dp"
android:gravity="end"
android:elevation="4dp">
<Button
<ImageButton
android:id="@+id/btn_center_vessel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Центр на судне"
android:textSize="12sp"
android:minWidth="120dp"
android:background="@android:color/white"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:src="@drawable/ownship"
android:contentDescription="Центр на судне"
android:padding="8dp"
android:scaleType="fitCenter"
android:layout_marginBottom="8dp" />
<Button
<ImageButton
android:id="@+id/btn_map_orientation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Карта по северу"
android:textSize="12sp"
android:minWidth="120dp"
android:background="@android:color/white"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:src="@drawable/compass"
android:contentDescription="Карта по северу"
android:padding="8dp"
android:scaleType="fitCenter"
android:layout_marginBottom="8dp" />
<Button
<ImageButton
android:id="@+id/btn_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="⚙️ Настройки"
android:textSize="12sp"
android:minWidth="120dp"
android:background="@android:color/white" />
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:src="@drawable/cog"
android:contentDescription="Настройки"
android:padding="8dp"
android:scaleType="fitCenter" />
<Button
<ImageButton
android:id="@+id/btn_ais_targets"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Цели AIS"
android:textSize="12sp"
android:minWidth="120dp"
android:background="@android:color/white"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/button_background"
android:src="@drawable/targetlist"
android:contentDescription="Цели AIS"
android:padding="8dp"
android:scaleType="fitCenter"
android:layout_marginTop="8dp" />
+1 -15
View File
@@ -13,18 +13,13 @@
android:background="@drawable/cursorcross" />
<!-- Координаты в первом квадранте (верхний левый) -->
<!-- Расстояние и пеленг в четвертом квадранте (нижний правый) -->
<LinearLayout
android:id="@+id/coordinates_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/panel_background"
android:orientation="vertical"
android:padding="8dp"
android:translationX="-60dp"
android:translationY="-40dp"
android:visibility="visible">
<TextView
@@ -47,18 +42,14 @@
</LinearLayout>
<!-- Расстояние и пеленг в четвертом квадранте (нижний правый) -->
<LinearLayout
android:id="@+id/distance_bearing_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="120dp"
android:layout_marginTop="60dp"
android:background="@drawable/panel_background"
android:orientation="vertical"
android:padding="8dp"
android:translationX="60dp"
android:translationY="40dp"
android:visibility="visible">
<TextView
@@ -90,14 +81,9 @@
android:id="@+id/ais_vessel_info_panel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/panel_background"
android:orientation="vertical"
android:padding="8dp"
android:translationX="-75dp"
android:translationY="60dp"
android:visibility="gone">
<TextView