feat: add ota and ui changes

This commit is contained in:
TCFDONMEZ
2026-09-29 14:32:25 +03:00
parent c102625306
commit 511c166436
61 changed files with 895 additions and 2178 deletions
+15 -119
View File
@@ -1,122 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
The Wi-Fi page: what the unit is on, a button to join without a trip into Settings,
and the list of networks it already has saved.
The button exists alongside the automatic attempt because the automatic one is
rate-limited and only runs while the upload service is up. A driver who has just
switched their hotspot on wants it now, not on the next tick.
-->
<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:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/spacing_lg">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_md"
app:cardBackgroundColor="@color/ev_surface"
app:cardCornerRadius="12dp"
app:strokeColor="@color/ev_outline"
app:strokeWidth="1dp"
app:cardElevation="3dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/spacing_lg">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_md"
android:text="@string/wifi_card_title"
android:textAppearance="@style/Text.EV.Title" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0">
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/wifi_current" />
<TextView android:id="@+id/wifi_ssid" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/wifi_state" />
<TextView android:id="@+id/wifi_state" style="@style/DataValue" />
</TableRow>
</TableLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/wifi_connect_button"
style="@style/Widget.EV.Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_md"
android:text="@string/wifi_connect_now" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/wifi_auto_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_md"
android:minHeight="@dimen/touch_target"
android:text="@string/wifi_auto_label"
android:textAppearance="@style/Text.EV.Body" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_xs"
android:text="@string/wifi_auto_hint"
android:textAppearance="@style/Text.EV.Secondary" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/ev_surface"
app:cardCornerRadius="12dp"
app:strokeColor="@color/ev_outline"
app:strokeWidth="1dp"
app:cardElevation="3dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/spacing_lg">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_sm"
android:text="@string/wifi_saved_title"
android:textAppearance="@style/Text.EV.Title" />
<TextView
android:id="@+id/wifi_saved_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/Text.EV.Body"
android:lineSpacingExtra="4dp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<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:fillViewport="true" android:clipToPadding="false">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="24dp">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="24dp" android:background="@drawable/bg_glass">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/wifi_card_title" android:textAppearance="@style/Text.EV.Eyebrow" />
<TextView android:id="@+id/wifi_ssid" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="—" android:textAppearance="@style/Text.EV.Metric" android:layout_marginTop="20dp" />
<TextView android:id="@+id/wifi_state" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="—" android:textAppearance="@style/Text.EV.Secondary" android:layout_marginTop="12dp" />
<com.google.android.material.button.MaterialButton android:id="@+id/wifi_connect_button" style="@style/Widget.EV.Button" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/wifi_connect_now" android:layout_marginTop="24dp" />
<com.google.android.material.switchmaterial.SwitchMaterial android:id="@+id/wifi_auto_switch" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="72dp" android:text="@string/wifi_auto_label" android:textAppearance="@style/Text.EV.Body" android:paddingTop="8dp" android:paddingBottom="8dp" app:useMaterialThemeColors="true" app:thumbTint="@color/switch_thumb" app:trackTint="@color/switch_track" android:textColor="@color/ev_text_primary" />
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/wifi_auto_hint" android:textAppearance="@style/Text.EV.Secondary" />
</LinearLayout>
<Space android:layout_width="1dp" android:layout_height="20dp" />
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="24dp" android:background="@drawable/bg_glass">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/wifi_saved_title" android:textAppearance="@style/Text.EV.Eyebrow" />
<TextView android:id="@+id/wifi_saved_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:textAppearance="@style/Text.EV.Body" android:lineSpacingExtra="16dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>