Fatih'sMG4 — ABRP telemetry for an MG4 EH32 on SWI69

A fork of malys/EVABRPUploader (itself a fork of Leon Kernan's ABRP_Uploader)
carrying the changes that make it work on this car. History starts here: the
tree is what matters, and the upstream projects are where the earlier work
belongs.

EVHardware is vendored rather than tracked as a submodule, so one clone
builds.

Telemetry. SOC, battery power and range read as unavailable on SWI69 because
the vendor fallbacks were gated to SWI68 alone, while the property ids they
use are the ones this car publishes — the gates now admit SWI69. Tyre
pressure, the odometer and charge status come from the vendor block too,
since the generic properties for all three are declared here and never
publish. Tyre pressure is confirmed on the vehicle; the other two are not
yet.

Vehicle page. Every signal the car answers, in a table. One that it does not
publish shows a dash: an unimplemented VHAL property returns zero, and
"0 °C" would read as a measurement.

Wi-Fi page. Joins a network the unit already has saved, so a phone hotspot
does not need a trip into Settings on every drive. Tried on the upload tick
and from a button, skipped while already associated. This leans on the unit
being API 28 and the build being platform-signed — getConfiguredNetworks and
enableNetwork are closed to ordinary apps from API 29 — and fails quietly
where that does not hold.

The OTA updater points at this repository. An APK from upstream is signed
with a different key, which Android will not install over a platform-signed
build.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TCFDONMEZ
2026-09-22 10:45:00 +03:00
co-authored by Claude
commit 2fd7b2dde1
245 changed files with 35594 additions and 0 deletions
+112
View File
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
A fixed top bar above a single ViewPager2, same shape as EVProfile and EVTasker.
The three screens — ABRP, Service, Log — are the pages of that one pager, in the
order the bar lists them. Each button goes to its page and a horizontal swipe walks
through them all: the gesture and the button name the same thing. The pages
themselves live in pane_abrp.xml / pane_service.xml / pane_log.xml, because a
ViewPager2 takes its children from an adapter rather than from this file.
Button navigation rather than Material tabs: on a vehicle screen, always-visible
64 dp targets beat a thin tab bar. The tabs share the width left by the title and
the About button equally (weight 1), so the row can be aimed at from memory whatever
the translated labels are.
No MaterialButtonToggleGroup: the group owns a checked state of its own, which would
fight the pager for who decides the current screen. Here the pager decides alone and
MainActivity.markCurrentPage posts isSelected — the fill, text, icon and stroke come
from the res/color/nav_tab_*.xml selectors.
-->
<LinearLayout 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:orientation="vertical"
android:background="@color/ev_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="horizontal"
android:gravity="center_vertical"
android:baselineAligned="false"
android:paddingStart="@dimen/spacing_md"
android:paddingEnd="@dimen/spacing_md"
android:background="@drawable/bg_topbar">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="@style/Text.EV.Title"
android:layout_marginEnd="@dimen/spacing_lg" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tabAbrp"
style="@style/Widget.EV.NavTab"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="@dimen/spacing_sm"
android:text="@string/tab_abrp"
app:icon="@drawable/ic_tab_abrp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tabService"
style="@style/Widget.EV.NavTab"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="@dimen/spacing_sm"
android:text="@string/tab_service"
app:icon="@drawable/ic_tab_service" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tabVehicle"
style="@style/Widget.EV.NavTab"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="@dimen/spacing_sm"
android:text="@string/tab_vehicle"
app:icon="@drawable/ic_tab_vehicle" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tabWifi"
style="@style/Widget.EV.NavTab"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="@dimen/spacing_sm"
android:text="@string/tab_wifi"
app:icon="@drawable/ic_tab_wifi" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tabLog"
style="@style/Widget.EV.NavTab"
android:layout_width="0dp"
android:layout_height="64dp"
android:layout_weight="1"
android:layout_marginEnd="@dimen/spacing_lg"
android:text="@string/tab_log"
app:icon="@drawable/ic_tab_log" />
<!-- About opens a dialog, not a page: it stays a plain button so it cannot be
mistaken for a fourth destination of the pager. -->
<com.google.android.material.button.MaterialButton
android:id="@+id/about_button"
style="@style/Widget.EV.Button.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_action" />
</LinearLayout>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
+142
View File
@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="760dp"
android:layout_height="wrap_content"
app:cardBackgroundColor="@color/ev_surface"
app:cardCornerRadius="@dimen/ev_corner"
app:cardElevation="0dp"
app:strokeColor="@color/ev_outline"
app:strokeWidth="1dp">
<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:paddingStart="@dimen/spacing_lg"
android:paddingTop="@dimen/spacing_md"
android:paddingEnd="@dimen/spacing_lg"
android:paddingBottom="@dimen/spacing_md"
android:text="@string/about_title"
android:textAppearance="@style/Text.EV.SectionHeader" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/ev_outline" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="@dimen/spacing_lg">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/spacing_lg"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="vertical">
<ImageView
android:layout_width="128dp"
android:layout_height="128dp"
android:background="@drawable/about_logo_tile"
android:contentDescription="@string/about_logo_description"
android:padding="@dimen/spacing_sm"
android:src="@drawable/ic_launcher_foreground" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_md"
android:text="@string/app_name"
android:textAppearance="@style/Text.EV.Title" />
<TextView
android:id="@+id/about_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_xs"
android:textAppearance="@style/Text.EV.Secondary" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_md"
android:lineSpacingMultiplier="1.25"
android:text="@string/about_attribution"
android:textAppearance="@style/Text.EV.Body" />
</LinearLayout>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/spacing_lg"
android:background="@color/ev_outline" />
<LinearLayout
android:layout_width="264dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:id="@+id/about_qr_code"
android:layout_width="208dp"
android:layout_height="208dp"
android:background="#FFFFFFFF"
android:contentDescription="@string/about_qr_description"
android:padding="@dimen/spacing_sm"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/about_repository"
android:layout_width="match_parent"
android:layout_height="@dimen/touch_target"
android:layout_marginTop="@dimen/spacing_sm"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="@string/about_repository"
android:textAppearance="@style/Text.EV.Secondary"
android:textColor="@color/ev_accent" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/ev_outline" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/spacing_md">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/about_made_with_love"
android:textAppearance="@style/Text.EV.Body" />
<com.google.android.material.button.MaterialButton
android:id="@+id/about_close"
style="@style/Widget.EV.Button.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="@dimen/touch_target"
android:text="@string/about_close" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
+153
View File
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- ABRP page of the main pager. Inflated once by MainActivity and handed to the pager
adapter as a fixed, non-recycled page, so the widget lookups below it stay valid for
the whole life of the activity. -->
<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">
<!-- Configuration card -->
<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="20dp"
android:text="@string/card_config"
android:textAppearance="@style/Text.EV.Title" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/api_key_layout"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="@string/hint_api_key"
app:endIconContentDescription="@string/desc_toggle_api_key"
app:endIconMode="password_toggle"
app:endIconMinSize="@dimen/touch_target"
app:helperText="@string/helper_api_key"
app:helperTextTextAppearance="@style/Text.EV.Secondary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/api_key_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:singleLine="true"
android:textSize="@dimen/text_body" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/token_layout"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_token"
app:endIconContentDescription="@string/desc_toggle_token"
app:endIconMode="password_toggle"
app:endIconMinSize="@dimen/touch_target"
app:helperText="@string/helper_token"
app:helperTextTextAppearance="@style/Text.EV.Secondary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/token_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:singleLine="true"
android:textSize="@dimen/text_body" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:gravity="end"
android:orientation="horizontal">
<Button
android:id="@+id/import_button"
style="@style/Widget.EV.Button.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:text="@string/btn_import" />
<Button
android:id="@+id/test_button"
style="@style/Widget.EV.Button.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:text="@string/btn_test" />
<Button
android:id="@+id/save_button"
style="@style/Widget.EV.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_save" />
</LinearLayout>
<Button
android:id="@+id/probe_button"
style="@style/Widget.EV.Button.Outlined"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="VHAL Probe" />
<LinearLayout
android:id="@+id/connection_status_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone">
<View
android:id="@+id/connection_indicator"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginEnd="10dp"
android:background="@drawable/circle_indicator" />
<TextView
android:id="@+id/connection_status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/Text.EV.Body" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
+51
View File
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Log page of the main pager: status, time and reason for the last 20 upload calls.
See pane_abrp.xml for how the pages are held. -->
<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"
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_md">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_call_log"
android:textAppearance="@style/Text.EV.Title" />
<TextView
android:id="@+id/call_log_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_sm"
android:fontFamily="monospace"
android:textSize="@dimen/text_secondary"
android:textColor="@color/ev_text_secondary"
android:text="@string/call_log_empty" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
+161
View File
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Service page of the main pager. See pane_abrp.xml for how the pages are held. -->
<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">
<!-- Service control card -->
<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="20dp"
android:text="@string/card_service"
android:textAppearance="@style/Text.EV.Title" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:minHeight="@dimen/touch_target">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_upload_enabled"
android:textAppearance="@style/Text.EV.Body" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/service_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- Redémarrage automatique. Personne n'ouvre cette application avant
de partir : si l'envoi ne repart pas tout seul quand la voiture
s'allume, il ne repart pas du tout. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:minHeight="@dimen/touch_target">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_autostart"
android:textAppearance="@style/Text.EV.Body" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/autostart_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hint_autostart"
android:textAppearance="@style/Text.EV.Secondary" />
<TextView
android:id="@+id/status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/status_stopped"
android:textAppearance="@style/Text.EV.Body" />
<!-- Cadence. Defaults are conservative: the head unit is awake whenever
the car is on, and both the upload tick and the GPS subscription
cost power for as long as it is. -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/label_frequency"
android:textAppearance="@style/Text.EV.Body" />
<Spinner
android:id="@+id/interval_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/touch_target" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hint_frequency"
android:textAppearance="@style/Text.EV.Secondary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:minHeight="@dimen/touch_target">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/label_boost_low_soc"
android:textAppearance="@style/Text.EV.Body" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/boost_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/low_soc_layout"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/label_low_soc_threshold">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/low_soc_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:maxLength="2" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
+173
View File
@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
The Vehicle page: every signal this build can read from the car, in the order a
driver glances at them.
The rows are static views rather than a RecyclerView on purpose — the set is fixed
and known at build time, and MainActivity holds the value TextViews the same way it
holds every other widget on the other pages. A row whose signal the car does not
publish shows a dash, never a zero: on this vehicle a zero from an unimplemented
VHAL property is indistinguishable from a reading, and "0 °C" or "0 kWh" is worse
than an honest blank.
-->
<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">
<!-- Live vehicle data -->
<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/vehicle_live_data"
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/vehicle_row_soc" />
<TextView android:id="@+id/vehicle_soc" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_range" />
<TextView android:id="@+id/vehicle_range" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_power" />
<TextView android:id="@+id/vehicle_power" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_speed" />
<TextView android:id="@+id/vehicle_speed" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_odometer" />
<TextView android:id="@+id/vehicle_odometer" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_charging" />
<TextView android:id="@+id/vehicle_charging" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_batt_temp" />
<TextView android:id="@+id/vehicle_batt_temp" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_ext_temp" />
<TextView android:id="@+id/vehicle_ext_temp" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_cabin_temp" />
<TextView android:id="@+id/vehicle_cabin_temp" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_hvac" />
<TextView android:id="@+id/vehicle_hvac" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_capacity" />
<TextView android:id="@+id/vehicle_capacity" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_row_soe" />
<TextView android:id="@+id/vehicle_soe" style="@style/DataValue" />
</TableRow>
</TableLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Tyre pressures -->
<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_md"
android:text="@string/vehicle_tires"
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/vehicle_tire_fl" />
<TextView android:id="@+id/vehicle_tire_fl" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_tire_fr" />
<TextView android:id="@+id/vehicle_tire_fr" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_tire_rl" />
<TextView android:id="@+id/vehicle_tire_rl" style="@style/DataValue" />
</TableRow>
<TableRow style="@style/DataRow">
<TextView style="@style/DataLabel" android:text="@string/vehicle_tire_rr" />
<TextView android:id="@+id/vehicle_tire_rr" style="@style/DataValue" />
</TableRow>
</TableLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
+122
View File
@@ -0,0 +1,122 @@
<?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>
</LinearLayout>
</ScrollView>