generated from Grigo/AndroidTemplate
25b1dabf73
Created menu Created udp support Created DockWidgets for compass and SOG/COG
239 lines
10 KiB
XML
239 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:padding="16dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<!-- Заголовок -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="⚙️ Настройки AIS Map"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@android:color/black"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
<!-- UDP Настройки -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="📡 UDP Настройки"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@android:color/black"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:hint="UDP Порт"
|
|
app:helperText="Порт для прослушивания AIS данных">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_udp_port"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number"
|
|
android:text="10110" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_udp_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Включить UDP слушатель"
|
|
android:textSize="16sp"
|
|
android:checked="true" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- Приоритеты данных -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardElevation="4dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="📊 Приоритеты данных"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@android:color/black"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Выберите источники данных для получения координат и навигационной информации:"
|
|
android:textSize="14sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_android_nmea_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Android NMEA (GPS API)"
|
|
android:textSize="16sp"
|
|
android:checked="true"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Использовать встроенный GPS Android для получения координат"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="16dp"
|
|
android:layout_marginStart="16dp" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_udp_nmea_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="UDP NMEA"
|
|
android:textSize="16sp"
|
|
android:checked="true"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Получать NMEA данные через UDP (курс, скорость, спутники)"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="16dp"
|
|
android:layout_marginStart="16dp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Режим работы:"
|
|
android:textSize="14sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@android:color/black"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<RadioGroup
|
|
android:id="@+id/radio_group_data_mode"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<RadioButton
|
|
android:id="@+id/radio_hybrid_mode"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Гибридный режим (рекомендуется)"
|
|
android:textSize="14sp"
|
|
android:checked="true" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Координаты от Android GPS, остальное от NMEA"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginStart="16dp" />
|
|
|
|
<RadioButton
|
|
android:id="@+id/radio_nmea_only"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Только NMEA"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Все данные только из NMEA сообщений"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginStart="16dp" />
|
|
|
|
<RadioButton
|
|
android:id="@+id/radio_android_only"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Только Android GPS"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Только встроенный GPS Android"
|
|
android:textSize="12sp"
|
|
android:textColor="@android:color/darker_gray"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginStart="16dp" />
|
|
|
|
</RadioGroup>
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- Кнопки -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="end">
|
|
|
|
<Button
|
|
android:id="@+id/btn_cancel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Отмена"
|
|
android:layout_marginEnd="8dp"
|
|
style="@style/Widget.Material3.Button.OutlinedButton" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_save"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Сохранить"
|
|
style="@style/Widget.Material3.Button" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|