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:
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Nav tab background. The state comes from View.isSelected, set by
|
||||
MainActivity.markCurrentPage on the one tab whose page is on screen: no color is
|
||||
applied by hand in code. -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/ev_accent" />
|
||||
<item android:color="@color/ev_surface_raised" />
|
||||
</selector>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Nav tab text + icon. The selected tab sits on @color/ev_accent, so its foreground
|
||||
is ev_on_accent; unselected tabs use ev_text_primary. Both pairs clear 7:1. -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/ev_on_accent" />
|
||||
<item android:color="@color/ev_text_primary" />
|
||||
</selector>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Nav tab outline. The selected tab keeps a stroke the same color as its fill so its
|
||||
size doesn't jump a dp when the page changes. -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/ev_accent" />
|
||||
<item android:color="@color/ev_outline" />
|
||||
</selector>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="@color/ev_icon_tile" />
|
||||
<corners android:radius="@dimen/ev_corner" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Top bar surface + a 2dp accent underline, so the bar reads as a bar even against
|
||||
a light page background. -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ev_surface" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:gravity="bottom" android:height="2dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/ev_accent" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#888888" />
|
||||
</shape>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generated by tools/icon-gen.mjs — do not hand-edit. See DESIGN.md § Iconography. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
|
||||
<path
|
||||
android:strokeColor="#F4F7FA"
|
||||
android:strokeWidth="5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M30,62 L43,49 L54,55 L74,35" />
|
||||
<path
|
||||
android:strokeColor="#F4F7FA"
|
||||
android:strokeWidth="5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M65,35 L74,35 L74,44" />
|
||||
<path
|
||||
android:fillColor="#E0424C"
|
||||
android:pathData="M74,35m-5,0a5,5 0 1,0 10,0a5,5 0 1,0 -10,0" />
|
||||
<path
|
||||
android:strokeColor="#C6CFD8"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M 40.96 79 L 43.42 72.44 L 45.88 79 M 41.89 76.54 L 44.96 76.54 M 48.01 72.44 L 48.01 79 M 48.01 72.44 L 50.8 72.44 C 52.61 72.44 52.61 75.56 50.8 75.56 L 48.01 75.56 M 48.01 75.88 L 50.97 75.88 C 52.93 75.88 52.93 79 50.97 79 L 48.01 79 M 55.07 79 L 55.07 72.44 L 57.85 72.44 C 59.82 72.44 59.82 75.88 57.85 75.88 L 55.07 75.88 M 57.2 75.88 L 59.99 79 M 62.12 79 L 62.12 72.44 L 64.91 72.44 C 66.87 72.44 66.87 75.88 64.91 75.88 L 62.12 75.88" />
|
||||
</vector>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generated by tools/icon-gen.mjs — do not hand-edit. See DESIGN.md § Iconography. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M30,62 L43,49 L54,55 L74,35" />
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M65,35 L74,35 L74,44" />
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M74,35m-5,0a5,5 0 1,0 10,0a5,5 0 1,0 -10,0" />
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M 40.96 79 L 43.42 72.44 L 45.88 79 M 41.89 76.54 L 44.96 76.54 M 48.01 72.44 L 48.01 79 M 48.01 72.44 L 50.8 72.44 C 52.61 72.44 52.61 75.56 50.8 75.56 L 48.01 75.56 M 48.01 75.88 L 50.97 75.88 C 52.93 75.88 52.93 79 50.97 79 L 48.01 79 M 55.07 79 L 55.07 72.44 L 57.85 72.44 C 59.82 72.44 59.82 75.88 57.85 75.88 L 55.07 75.88 M 57.2 75.88 L 59.99 79 M 62.12 79 L 62.12 72.44 L 64.91 72.44 C 66.87 72.44 66.87 75.88 64.91 75.88 L 62.12 75.88" />
|
||||
</vector>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Flèche vers un plateau : onglet ABRP (envoi de télémétrie). Teinté par
|
||||
@color/nav_tab_foreground. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M4,14V19H20V14" />
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M12,3V13M8,7L12,3L16,7" />
|
||||
</vector>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Terminal : onglet Log. Teinté par @color/nav_tab_foreground. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M3,5H21V19H3Z" />
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M6,9l4,3l-4,3" />
|
||||
<path
|
||||
android:strokeColor="#FFFFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineCap="round"
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M12,16h6" />
|
||||
</vector>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Engrenage : onglet Service. Teinté par @color/nav_tab_foreground. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Car, for the Vehicle page. Filled so it reads at a glance on a vehicle screen. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18.92,6.01C18.72,5.42 18.16,5 17.5,5h-11c-0.66,0 -1.21,0.42 -1.42,1.01L3,12v8c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-1h12v1c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-8l-2.08,-5.99zM6.5,16c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,13 6.5,13 8,13.67 8,14.5 7.33,16 6.5,16zM17.5,16c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM5,11l1.5,-4.5h11L19,11H5z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Wi-Fi arcs, for the Wi-Fi page. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z" />
|
||||
</vector>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ev_icon_tile" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EVSuite tokens - DARK theme. See DESIGN.md section Colors.
|
||||
Generated by tools/sync-tokens.mjs and identical in all six apps.
|
||||
|
||||
Dark remains the mode that matters in a vehicle: a light background filling the
|
||||
windscreen at night is glare. The suite moved to DayNight by explicit decision,
|
||||
which does not cancel that constraint - it is the light palette that had to rise
|
||||
to the same 7:1 floor, not the other way round.
|
||||
|
||||
Values not redefined here fall back to values/, which is why ev_icon_tile is
|
||||
declared once, in the light file. -->
|
||||
<resources>
|
||||
<color name="ev_background">#FF0B0D0F</color>
|
||||
<color name="ev_surface">#FF15181C</color>
|
||||
<color name="ev_surface_raised">#FF272C33</color>
|
||||
<!-- 4.70:1 on ev_surface. The previous #4A525B sat at 2.25:1: a border below
|
||||
the 3:1 non-text floor is a border that is not there. -->
|
||||
<color name="ev_outline">#FF7A8492</color>
|
||||
<color name="ev_text_primary">#FFF4F7FA</color>
|
||||
<!-- 8.91:1 worst case (on ev_surface_raised) - the previous #9EA6AE fell to
|
||||
6:1, unreadable in sunlight. -->
|
||||
<color name="ev_text_secondary">#FFC6CFD8</color>
|
||||
<color name="ev_accent">#FF7FD4FA</color>
|
||||
<color name="ev_on_accent">#FF04121A</color>
|
||||
|
||||
<!-- Status. Never the sole carrier of meaning: a text label always accompanies
|
||||
the colour. -->
|
||||
<color name="ev_ok">#FF8FE6A6</color>
|
||||
<color name="ev_warn">#FFFFC978</color>
|
||||
<color name="ev_error">#FFFFACAC</color>
|
||||
|
||||
<!-- Pressed: an alpha veil over the surface, not a different hue. -->
|
||||
<color name="ev_pressed">#1FFFFFFF</color>
|
||||
<color name="ev_pressed_strong">#33FFFFFF</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EVSuite tokens - LIGHT theme. See DESIGN.md section Colors.
|
||||
Generated by tools/sync-tokens.mjs and identical in all six apps: edit
|
||||
tools/tokens/colors.light.xml, not this copy, and re-check the ratios.
|
||||
|
||||
Contrast: this screen is read in daylight, usually through a reflection. Every
|
||||
text colour clears 7:1 (AAA) on every surface it can land on, not the 4.5:1 AA
|
||||
minimum, which collapses as soon as outside brightness rises. The AAA floor
|
||||
applies to the light theme too - a badly contrasted light theme is no more
|
||||
readable than a badly contrasted dark one. -->
|
||||
<resources>
|
||||
<color name="ev_background">#FFF2F4F7</color>
|
||||
<color name="ev_surface">#FFFFFFFF</color>
|
||||
<color name="ev_surface_raised">#FFE4E8ED</color>
|
||||
<!-- Card border. Without it, surface and surface_raised merge in sunlight.
|
||||
4.07:1 on ev_surface - above the 3:1 floor for non-text UI (WCAG 1.4.11),
|
||||
which the previous #4A525B (2.25:1) did not clear. -->
|
||||
<color name="ev_outline">#FF737F8F</color>
|
||||
<color name="ev_text_primary">#FF101418</color>
|
||||
<!-- 7.22:1 worst case (on ev_surface_raised). -->
|
||||
<color name="ev_text_secondary">#FF414B55</color>
|
||||
<!-- A deep cyan, not the dark theme's pale one: a pale cyan on white falls to
|
||||
1.5:1 and disappears outright in daylight. 7.69:1 worst case. -->
|
||||
<color name="ev_accent">#FF044C63</color>
|
||||
<color name="ev_on_accent">#FFFFFFFF</color>
|
||||
|
||||
<!-- Status. Never the sole carrier of meaning: a text label always accompanies
|
||||
the colour. -->
|
||||
<color name="ev_ok">#FF09501F</color>
|
||||
<color name="ev_warn">#FF6B3A00</color>
|
||||
<color name="ev_error">#FF8F0F18</color>
|
||||
|
||||
<!-- Pressed: an alpha veil over the surface, not a different hue, so a pressed
|
||||
card still reads as the same card. -->
|
||||
<color name="ev_pressed">#14000000</color>
|
||||
<color name="ev_pressed_strong">#29000000</color>
|
||||
|
||||
<!-- Launcher icon tile. The same in light and dark: it is the suite's mark, not
|
||||
a surface. See DESIGN.md section Iconography. -->
|
||||
<color name="ev_icon_tile">#FF2A2A2A</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EVSuite tokens - metrics. See DESIGN.md sections Layout and Typography.
|
||||
Generated by tools/sync-tokens.mjs and identical in all six apps. App-specific
|
||||
dimensions are declared alongside, in dimens_app.xml, with the reason. -->
|
||||
<resources>
|
||||
<!-- Vehicle screen: 12.8", ~70 cm from the driver, used while driving, sometimes
|
||||
in full sun, by fingers that aim badly. Everything is larger than on a
|
||||
hand-held phone. DPI is user-adjustable per app on this platform, so nothing
|
||||
assumes a pixel size. -->
|
||||
<dimen name="touch_target">72dp</dimen>
|
||||
<dimen name="spacing_xs">4dp</dimen>
|
||||
<dimen name="spacing_sm">8dp</dimen>
|
||||
<dimen name="spacing_md">16dp</dimen>
|
||||
<dimen name="spacing_lg">24dp</dimen>
|
||||
|
||||
<!-- One radius across the whole suite: it is what makes six apps written by
|
||||
different hands read as one. -->
|
||||
<dimen name="ev_corner">12dp</dimen>
|
||||
|
||||
<!-- Text sizes. The floor is text_label: below 16sp, contrast no longer
|
||||
compensates for reflection and reading distance. -->
|
||||
<dimen name="text_display">32sp</dimen>
|
||||
<dimen name="text_title">26sp</dimen>
|
||||
<dimen name="text_body">20sp</dimen>
|
||||
<dimen name="text_secondary">17sp</dimen>
|
||||
<dimen name="text_label">16sp</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,122 @@
|
||||
<resources>
|
||||
<string name="app_name">Fatih\'sMG4</string>
|
||||
|
||||
<!-- Main screen -->
|
||||
<string name="tab_abrp">ABRP</string>
|
||||
<string name="tab_service">Upload Service</string>
|
||||
<string name="tab_vehicle">Araç</string>
|
||||
<string name="tab_wifi">Wi-Fi</string>
|
||||
<string name="tab_log">Log</string>
|
||||
|
||||
<!-- Wi-Fi page -->
|
||||
<string name="wifi_card_title">Wi-Fi Bağlantısı</string>
|
||||
<string name="wifi_current">Bağlı ağ</string>
|
||||
<string name="wifi_state">Durum</string>
|
||||
<string name="wifi_connect_now">Şimdi Bağlan</string>
|
||||
<string name="wifi_auto_label">Arka planda otomatik bağlan</string>
|
||||
<string name="wifi_auto_hint">Yükleme servisi çalışırken bağlantı koptuğunda kayıtlı ağlara kendi kendine bağlanmayı dener.</string>
|
||||
<string name="wifi_saved_title">Kayıtlı Ağlar</string>
|
||||
<string name="wifi_saved_empty">Kayıtlı ağ okunamadı</string>
|
||||
<string name="wifi_not_connected">Bağlı değil</string>
|
||||
|
||||
<!-- Vehicle page -->
|
||||
<string name="vehicle_live_data">Canlı Araç Verileri</string>
|
||||
<string name="vehicle_tires">Lastik Basınçları</string>
|
||||
<string name="vehicle_row_soc">Şarj (SOC)</string>
|
||||
<string name="vehicle_row_range">Menzil</string>
|
||||
<string name="vehicle_row_power">Güç</string>
|
||||
<string name="vehicle_row_speed">Hız</string>
|
||||
<string name="vehicle_row_odometer">Kilometre</string>
|
||||
<string name="vehicle_row_batt_temp">Batarya Sıcaklığı</string>
|
||||
<string name="vehicle_row_ext_temp">Dış Sıcaklık</string>
|
||||
<string name="vehicle_row_cabin_temp">Kabin Sıcaklığı</string>
|
||||
<string name="vehicle_row_hvac">Klima Ayarı</string>
|
||||
<string name="vehicle_row_capacity">Batarya Kapasitesi</string>
|
||||
<string name="vehicle_row_soe">Kalan Enerji</string>
|
||||
<string name="vehicle_row_charging">Şarj Durumu</string>
|
||||
<string name="vehicle_tire_fl">Ön Sol</string>
|
||||
<string name="vehicle_tire_fr">Ön Sağ</string>
|
||||
<string name="vehicle_tire_rl">Arka Sol</string>
|
||||
<string name="vehicle_tire_rr">Arka Sağ</string>
|
||||
<string name="card_config">Configuration</string>
|
||||
<string name="hint_api_key">ABRP API Key</string>
|
||||
<string name="default_abrp_api_key" translatable="false">8cfc314b-03cd-4efe-ab7d-4431cd8f2e2d</string>
|
||||
<string name="helper_api_key">Default: open-source ABRP telemetry key. You may replace it with your own.</string>
|
||||
<string name="api_key_required">Enter your ABRP API key first</string>
|
||||
<string name="hint_token">ABRP User Token</string>
|
||||
<string name="helper_token">Find your token in the ABRP app: Settings → Connections → Generic (Manual Entry)</string>
|
||||
<string name="desc_toggle_api_key">Show or hide API key</string>
|
||||
<string name="desc_toggle_token">Show or hide user token</string>
|
||||
<string name="btn_save">Save</string>
|
||||
<string name="btn_test">Test Connection</string>
|
||||
<string name="btn_import">Import file</string>
|
||||
|
||||
<!-- Config file import -->
|
||||
<string name="import_ok">Config imported — press Test to verify</string>
|
||||
<string name="import_err_read">Could not read that file</string>
|
||||
<string name="import_err_empty">No ABRP settings found in that file</string>
|
||||
<string name="import_err_not_found">No config file found. Copy it to %1$s</string>
|
||||
|
||||
<!-- Connection test -->
|
||||
<string name="conn_testing">Testing…</string>
|
||||
<string name="conn_ok">Connected — API responding OK</string>
|
||||
<string name="conn_err_auth">Auth failed — check your API key and token</string>
|
||||
<string name="perm_denied_location">Location denied — telemetry will have no position. Grant it in Settings to send GPS to ABRP.</string>
|
||||
<string name="perm_denied_car">Vehicle data denied — no battery %%, speed or range will be sent. Grant it in Settings.</string>
|
||||
<string name="perm_denied_all">Location and vehicle data denied — only a timestamp will be sent. Grant both in Settings.</string>
|
||||
<string name="conn_err_no_internet">No internet connection</string>
|
||||
<string name="conn_err_timeout">Connection timed out</string>
|
||||
<string name="conn_err_http">Server error (HTTP %1$d)</string>
|
||||
<string name="token_required">Enter your ABRP token first</string>
|
||||
|
||||
<string name="card_service">Upload Service</string>
|
||||
<string name="label_upload_enabled">Enable background uploading</string>
|
||||
<string name="label_autostart">Start automatically with the car</string>
|
||||
<string name="hint_autostart">Uploading resumes on its own when the head unit powers up. Turn this off to start it by hand from this screen.</string>
|
||||
|
||||
<string name="status_stopped">Service not running</string>
|
||||
|
||||
<!-- Cadence configuration -->
|
||||
<string name="label_frequency">Upload frequency</string>
|
||||
<string name="hint_frequency">Applies while driving. Parked and unplugged, the app backs off to one upload every 15 minutes on its own.</string>
|
||||
<string name="label_boost_low_soc">Upload more often at low battery</string>
|
||||
<string name="label_low_soc_threshold">Low battery threshold (%)</string>
|
||||
<plurals name="interval_seconds">
|
||||
<item quantity="one">Every %1$d second</item>
|
||||
<item quantity="other">Every %1$d seconds</item>
|
||||
</plurals>
|
||||
<plurals name="interval_minutes">
|
||||
<item quantity="one">Every %1$d minute</item>
|
||||
<item quantity="other">Every %1$d minutes</item>
|
||||
</plurals>
|
||||
|
||||
<!-- Service state -->
|
||||
<string name="state_stopped">Stopped</string>
|
||||
<string name="state_starting">Starting…</string>
|
||||
<string name="state_running">Running</string>
|
||||
<string name="state_error">In error — last %1$d uploads failed</string>
|
||||
|
||||
<!-- Call log -->
|
||||
<string name="label_call_log">Recent uploads</string>
|
||||
<string name="call_log_empty">No upload attempted yet.</string>
|
||||
<string name="status_starting">Starting…</string>
|
||||
<string name="status_running_no_upload">Running — waiting for first upload</string>
|
||||
<string name="status_last_upload">Last upload: %1$s (%2$s)</string>
|
||||
<string name="status_ok">OK</string>
|
||||
|
||||
<!-- Notification -->
|
||||
<string name="notif_channel_name">ABRP Upload Service</string>
|
||||
<string name="notif_channel_desc">Shows vehicle telemetry upload status</string>
|
||||
<string name="notif_title">ABRP Uploader</string>
|
||||
<string name="notif_action_stop">Stop</string>
|
||||
<string name="about_action">About</string>
|
||||
<string name="about_title">Fatih\'sMG4 Hakkında</string>
|
||||
<string name="about_version">Version %1$s</string>
|
||||
<string name="about_attribution">Fork of malys / EVABRPUploader\nand Leon Kernan / ABRP_Uploader</string>
|
||||
<string name="about_repository">github.com/fatihdonmezdev/EVABRP</string>
|
||||
<string name="about_made_with_love">MG4 EH32 · SWI69</string>
|
||||
<string name="about_logo_description">EVABRPUploader logo</string>
|
||||
<string name="about_qr_description">QR code for the project repository</string>
|
||||
<string name="about_version_unknown">unknown</string>
|
||||
<string name="about_close">Close</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Per-app styles (not synced by tools/sync-tokens.mjs — see styles_ev.xml for the
|
||||
shared set). -->
|
||||
<resources>
|
||||
|
||||
<!-- Icon-over-label nav tab, identical to EVProfile's and EVTasker's. The tabs
|
||||
share the bar's width equally, so the label has to shrink rather than push its
|
||||
neighbours around: hence autoSize and a single line. Selected state is
|
||||
View.isSelected, set by MainActivity.markCurrentPage, read by the
|
||||
res/color/nav_tab_*.xml selectors — no color is ever set from code. -->
|
||||
<style name="Widget.EV.NavTab" parent="Widget.Material3.Button.OutlinedButton">
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:minHeight">0dp</item>
|
||||
<item name="android:insetTop">0dp</item>
|
||||
<item name="android:insetBottom">0dp</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_xs</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_xs</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_xs</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_xs</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:letterSpacing">0.02</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textColor">@color/nav_tab_foreground</item>
|
||||
<item name="autoSizeTextType">uniform</item>
|
||||
<item name="autoSizeMinTextSize">12sp</item>
|
||||
<item name="autoSizeMaxTextSize">@dimen/text_label</item>
|
||||
<item name="iconGravity">top</item>
|
||||
<item name="iconSize">28dp</item>
|
||||
<item name="iconPadding">@dimen/spacing_xs</item>
|
||||
<item name="iconTint">@color/nav_tab_foreground</item>
|
||||
<item name="backgroundTint">@color/nav_tab_background</item>
|
||||
<item name="strokeColor">@color/nav_tab_stroke</item>
|
||||
<item name="strokeWidth">1dp</item>
|
||||
<item name="cornerRadius">@dimen/ev_corner</item>
|
||||
<item name="elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Vehicle page. A label/value table: the label takes the slack (stretchColumns=0)
|
||||
and the value is right-aligned so the numbers line up down the column, which
|
||||
is what makes a reading legible at a glance from the driver's seat. -->
|
||||
<style name="DataRow" parent="">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:paddingTop">@dimen/spacing_sm</item>
|
||||
<item name="android:paddingBottom">@dimen/spacing_sm</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="DataLabel" parent="Text.EV.Body">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textColor">@color/ev_text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="DataValue" parent="Text.EV.Body">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_md</item>
|
||||
<item name="android:gravity">end</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/ev_text_primary</item>
|
||||
<!-- Placeholder, replaced on the first refresh tick. A dash, never a zero:
|
||||
see the note at the top of pane_vehicle.xml. -->
|
||||
<item name="android:text">—</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- EVSuite - component styles. See DESIGN.md section Components.
|
||||
Generated by tools/sync-tokens.mjs: identical in all six apps, edit only
|
||||
tools/tokens/styles.xml. The application theme itself stays in values/themes.xml,
|
||||
because its name changes from one app to the next.
|
||||
|
||||
These styles carry the same names everywhere, so a screen can move between
|
||||
repositories without being renamed. -->
|
||||
<resources>
|
||||
|
||||
<!-- Dialogs inherit the same contrast as everything else: without this they fall
|
||||
back to Material's default palette, an indoor grey-mauve that is the first
|
||||
thing to wash out in sunlight. -->
|
||||
<style name="ThemeOverlay.EV.Dialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="colorSurface">@color/ev_surface_raised</item>
|
||||
<item name="colorOnSurface">@color/ev_text_primary</item>
|
||||
<item name="colorOnSurfaceVariant">@color/ev_text_secondary</item>
|
||||
<item name="android:textColorPrimary">@color/ev_text_primary</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/Widget.EV.DialogButton</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/Widget.EV.DialogButton</item>
|
||||
</style>
|
||||
|
||||
<!-- 72dp touch target: the finger aims badly on the road and the screen is far
|
||||
away. This is the minimum used everywhere in the suite, including where
|
||||
Material offers something much smaller. -->
|
||||
<style name="Widget.EV.Button" parent="Widget.Material3.Button">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.EV.Button</item>
|
||||
<item name="android:minHeight">@dimen/touch_target</item>
|
||||
<item name="android:textSize">@dimen/text_body</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_lg</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_lg</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.EV.Button.Outlined" parent="Widget.Material3.Button.OutlinedButton">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.EV.Button</item>
|
||||
<item name="android:minHeight">@dimen/touch_target</item>
|
||||
<item name="android:textSize">@dimen/text_body</item>
|
||||
<item name="android:paddingStart">@dimen/spacing_lg</item>
|
||||
<item name="android:paddingEnd">@dimen/spacing_lg</item>
|
||||
</style>
|
||||
|
||||
<!-- Dialog buttons are the smallest thing in any app and the easiest to miss:
|
||||
pulled up to the same target as the rest. -->
|
||||
<style name="Widget.EV.DialogButton" parent="Widget.Material3.Button.TextButton.Dialog">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.EV.Button</item>
|
||||
<item name="android:minHeight">@dimen/touch_target</item>
|
||||
<item name="android:minWidth">140dp</item>
|
||||
<item name="android:textSize">@dimen/text_body</item>
|
||||
</style>
|
||||
|
||||
<!-- A switch that needs a precise tap is a switch that gets missed at 90 km/h. -->
|
||||
<style name="Widget.EV.Switch" parent="Widget.Material3.CompoundButton.MaterialSwitch">
|
||||
<item name="android:minHeight">@dimen/touch_target</item>
|
||||
<item name="android:textSize">@dimen/text_body</item>
|
||||
<item name="android:textColor">@color/ev_text_primary</item>
|
||||
</style>
|
||||
|
||||
<!-- The only tracked type in the suite. The tracking is what lets it work at the
|
||||
16sp floor without shouting. -->
|
||||
<style name="Text.EV.SectionHeader" parent="TextAppearance.Material3.LabelLarge">
|
||||
<item name="android:textSize">@dimen/text_label</item>
|
||||
<item name="android:textColor">@color/ev_accent</item>
|
||||
<item name="android:letterSpacing">0.12</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<!-- One Display element per screen: two 32sp numbers competing for attention are
|
||||
two glances, and the glance is the budget. -->
|
||||
<style name="Text.EV.Display" parent="TextAppearance.Material3.HeadlineSmall">
|
||||
<item name="android:textSize">@dimen/text_display</item>
|
||||
<item name="android:textColor">@color/ev_text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="Text.EV.Title" parent="TextAppearance.Material3.TitleLarge">
|
||||
<item name="android:textSize">@dimen/text_title</item>
|
||||
<item name="android:textColor">@color/ev_text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="Text.EV.Body" parent="TextAppearance.Material3.BodyLarge">
|
||||
<item name="android:textSize">@dimen/text_body</item>
|
||||
<item name="android:textColor">@color/ev_text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="Text.EV.Secondary" parent="TextAppearance.Material3.BodyMedium">
|
||||
<item name="android:textSize">@dimen/text_secondary</item>
|
||||
<item name="android:textColor">@color/ev_text_secondary</item>
|
||||
</style>
|
||||
|
||||
<!-- The suite radius applied to buttons. Material3 buttons are fully rounded by
|
||||
default, which reads as a different design language from every card and dialog
|
||||
around them. This lived in EVSwipe only, in a generated file, so the first sync
|
||||
deleted it — one radius across the suite has to be a token, not a local edit. -->
|
||||
<style name="ShapeAppearanceOverlay.EV.Button" parent="">
|
||||
<item name="cornerSize">@dimen/ev_corner</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- DayNight, not a forced dark theme: the suite follows the vehicle's day/night
|
||||
setting. Dark is still the mode that matters - a light background filling the
|
||||
windscreen at night is glare - which is why the light palette was raised to
|
||||
the same 7:1 floor as the dark one rather than the other way round.
|
||||
Shared component styles live in styles_ev.xml. -->
|
||||
<style name="Theme.EVABRPUploader" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/ev_accent</item>
|
||||
<item name="colorOnPrimary">@color/ev_on_accent</item>
|
||||
<item name="colorSurface">@color/ev_surface</item>
|
||||
<item name="colorSurfaceContainer">@color/ev_surface_raised</item>
|
||||
<item name="android:colorBackground">@color/ev_background</item>
|
||||
<item name="android:windowBackground">@color/ev_background</item>
|
||||
<item name="colorError">@color/ev_error</item>
|
||||
<item name="android:statusBarColor">@color/ev_background</item>
|
||||
<!-- Material3's "on surface" is a grey-mauve that is comfortable indoors and
|
||||
too weak in full sun: a hard contrast is imposed instead. -->
|
||||
<item name="colorOnSurface">@color/ev_text_primary</item>
|
||||
<item name="colorOnSurfaceVariant">@color/ev_text_secondary</item>
|
||||
<item name="colorOnBackground">@color/ev_text_primary</item>
|
||||
<item name="colorOutline">@color/ev_outline</item>
|
||||
<item name="android:textColorPrimary">@color/ev_text_primary</item>
|
||||
<item name="android:textColorSecondary">@color/ev_text_secondary</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.EV.Dialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Backups are disabled outright (android:allowBackup="false"). These rules are
|
||||
the belt-and-braces layer: the credential store must never leave the device
|
||||
even if backups are re-enabled by mistake.
|
||||
-->
|
||||
<full-backup-content>
|
||||
<exclude domain="sharedpref" path="abrp_secure_prefs.xml"/>
|
||||
<exclude domain="sharedpref" path="abrp_prefs.xml"/>
|
||||
</full-backup-content>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
See backup_rules.xml. Applies to cloud backup and device-to-device transfer
|
||||
on API 31+: the ABRP credentials are excluded from both.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<exclude domain="sharedpref" path="abrp_secure_prefs.xml"/>
|
||||
<exclude domain="sharedpref" path="abrp_prefs.xml"/>
|
||||
</cloud-backup>
|
||||
<device-transfer>
|
||||
<exclude domain="sharedpref" path="abrp_secure_prefs.xml"/>
|
||||
<exclude domain="sharedpref" path="abrp_prefs.xml"/>
|
||||
</device-transfer>
|
||||
</data-extraction-rules>
|
||||
Reference in New Issue
Block a user