From 9b5fcc0734178b1ca9f996b9e9d1142fd3077aaf Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sun, 18 Oct 2026 13:52:57 +0200 Subject: [PATCH] App 2.14.0: accent colour after the MG4 paints; car colour probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The accent is selectable in Settings → Display: Dynamic Red (default), Volcano Orange, Holborn Blue, Racing Green, Camden Grey, Monument Silver, Arctic White and Black Pearl. White, silver and black cannot be an accent on the black screen as they are, so they become light greys and a pearl blue-grey. The accent palette is now theme attributes (attrs_accent.xml) with one overlay per paint (accents.xml), applied before the activity inflates; layouts, colour lists, drawables and the views that draw in code use them, including the red tints that were hard-coded. A change recreates the activity on the same page. Android 9 crashes on gradients with theme colours, so the battery card is built from layers. Logs → "Look for the car colour" lists the head unit's system properties that mention colour, paint or car model, to find out whether the paint colour can be read from the car. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki --- AGENTS.md | 4 +- SPECS.md | 8 ++ app/build.gradle | 4 +- .../java/com/evsuite/abrp/AccentColor.java | 51 +++++++++++ .../java/com/evsuite/abrp/CarColorProbe.java | 59 +++++++++++++ .../com/evsuite/abrp/ChargingGraphView.java | 2 +- .../java/com/evsuite/abrp/MainActivity.java | 54 +++++++++++- .../com/evsuite/abrp/PremiumBackdropView.java | 11 ++- app/src/main/res/color/input_stroke.xml | 2 +- app/src/main/res/color/nav_tab_background.xml | 2 +- app/src/main/res/color/nav_tab_foreground.xml | 2 +- app/src/main/res/color/nav_tab_stroke.xml | 2 +- app/src/main/res/color/switch_thumb.xml | 2 +- app/src/main/res/color/switch_track.xml | 2 +- app/src/main/res/drawable/bg_battery_card.xml | 16 +++- app/src/main/res/drawable/bg_input_panel.xml | 2 +- app/src/main/res/drawable/bg_topbar.xml | 2 +- .../main/res/drawable/bg_version_badge.xml | 4 +- app/src/main/res/drawable/ic_chevron_down.xml | 2 +- app/src/main/res/drawable/ic_info.xml | 2 +- .../main/res/drawable/ic_vehicle_outline.xml | 6 +- .../main/res/layout-w1000dp/activity_main.xml | 4 +- .../main/res/layout-w1000dp/pane_settings.xml | 2 + .../main/res/layout-w1000dp/pane_vehicle.xml | 22 ++--- .../main/res/layout-w600dp/dialog_about.xml | 4 +- app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/layout/dialog_about.xml | 4 +- app/src/main/res/layout/pane_charging.xml | 4 +- app/src/main/res/layout/pane_consumption.xml | 4 +- app/src/main/res/layout/pane_log.xml | 4 + app/src/main/res/layout/pane_settings.xml | 2 + app/src/main/res/layout/pane_vehicle.xml | 22 ++--- app/src/main/res/values/accents.xml | 87 +++++++++++++++++++ app/src/main/res/values/attrs_accent.xml | 13 +++ app/src/main/res/values/colors.xml | 7 +- app/src/main/res/values/strings.xml | 5 ++ app/src/main/res/values/styles_app.xml | 6 +- app/src/main/res/values/styles_ev.xml | 6 +- app/src/main/res/values/themes.xml | 16 +++- .../com/evsuite/abrp/AccentColorTest.java | 22 +++++ .../com/evsuite/abrp/CarColorProbeTest.java | 24 +++++ 41 files changed, 425 insertions(+), 74 deletions(-) create mode 100644 app/src/main/java/com/evsuite/abrp/AccentColor.java create mode 100644 app/src/main/java/com/evsuite/abrp/CarColorProbe.java create mode 100644 app/src/main/res/values/accents.xml create mode 100644 app/src/main/res/values/attrs_accent.xml create mode 100644 app/src/test/java/com/evsuite/abrp/AccentColorTest.java create mode 100644 app/src/test/java/com/evsuite/abrp/CarColorProbeTest.java diff --git a/AGENTS.md b/AGENTS.md index e6ec9a0..7eb7106 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,9 @@ workspace `DESIGN.md` apply; this file contains only telemetry-specific addition ## App-specific visual direction (2.2.6) The user explicitly requested a permanent OLED-black theme, charcoal glass-like cards, -MG red accents (#E0424C, with a light #FF9A9E and a deep #3A1215 variant; they replaced the earlier muted gold and cyan). These app resources intentionally override the shared +an accent the user picks from the MG4 paint colours (Dynamic Red #E0424C by default; the palette +is theme attributes in `res/values/attrs_accent.xml` and `accents.xml` — use `?attr/evAccent…`, +never a hard-coded accent hex). These app resources intentionally override the shared DESIGN.md palette, DayNight preference and flat-surface rules. Do not overwrite them with the shared token generator. Use static gradients rather than continuous effects; keep large touch targets, readable text and null telemetry shown as a dash. diff --git a/SPECS.md b/SPECS.md index 4866cf4..7692eb7 100644 --- a/SPECS.md +++ b/SPECS.md @@ -113,6 +113,14 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does * INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside `kubectl apply -f k8s/`). Filled-in secrets live only there from now on. +- 2026-10-18 — App 2.14.0: accent colour selectable after the MG4 paints (Settings → Display): + Dynamic Red (default), Volcano Orange, Holborn Blue, Racing Green, Camden Grey, Monument Silver, + Arctic White, Black Pearl; white, silver and black become light greys and a pearl blue-grey, + since they cannot be an accent on black. The accent palette is theme attributes + (`attrs_accent.xml`, overlays in `accents.xml`); a change recreates the activity on the same + page. Android 9 crashes on gradients with theme colours, so the battery card is layered. + Logs tab: "Look for the car colour" lists system properties that mention colour, paint or car + model, to find out whether the paint colour can be read (nothing on the emulator). - 2026-10-18 — App 2.13.0: tyre pressures in bar by default, kPa or psi selectable (Settings → Display; display only, the car and the server keep kPa). "Power, 5-min average" card under Power: time-weighted mean battery power, standing included. diff --git a/app/build.gradle b/app/build.gradle index e82f366..03d0b55 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,8 +34,8 @@ android { applicationId "com.stinnesbeck.nilsmg4" minSdk 27 targetSdk 36 - versionCode 77 - versionName "2.13.0" + versionCode 78 + versionName "2.14.0" // Nothing about the server ships in the APK: its URL and ingest token are entered in // the app's Server tab (ServerConfig), and the database is only reachable by the server. diff --git a/app/src/main/java/com/evsuite/abrp/AccentColor.java b/app/src/main/java/com/evsuite/abrp/AccentColor.java new file mode 100644 index 0000000..762c4f2 --- /dev/null +++ b/app/src/main/java/com/evsuite/abrp/AccentColor.java @@ -0,0 +1,51 @@ +package com.evsuite.abrp; + +import android.content.Context; +import android.util.TypedValue; + +/** + * The app's accent colour, after the MG4 paint colours; Dynamic Red unless another is chosen + * (Settings → Display). Each is a theme overlay in res/values/accents.xml that MainActivity lays + * over the app theme before it inflates anything; a change recreates the activity. + */ +enum AccentColor { + DYNAMIC_RED("Dynamic Red", R.style.ThemeOverlay_EV_Accent_DynamicRed), + VOLCANO_ORANGE("Volcano Orange", R.style.ThemeOverlay_EV_Accent_VolcanoOrange), + HOLBORN_BLUE("Holborn Blue", R.style.ThemeOverlay_EV_Accent_HolbornBlue), + RACING_GREEN("Racing Green", R.style.ThemeOverlay_EV_Accent_RacingGreen), + CAMDEN_GREY("Camden Grey", R.style.ThemeOverlay_EV_Accent_CamdenGrey), + MONUMENT_SILVER("Monument Silver", R.style.ThemeOverlay_EV_Accent_MonumentSilver), + ARCTIC_WHITE("Arctic White", R.style.ThemeOverlay_EV_Accent_ArcticWhite), + BLACK_PEARL("Black Pearl", R.style.ThemeOverlay_EV_Accent_BlackPearl); + + static final String PREF_KEY = "accent_color"; + static final AccentColor DEFAULT = DYNAMIC_RED; + + final String label; + final int overlay; + + AccentColor(String label, int overlay) { + this.label = label; + this.overlay = overlay; + } + + /** The stored choice; anything unknown falls back to Dynamic Red. */ + static AccentColor fromPref(String name) { + for (AccentColor c : values()) { + if (c.name().equals(name)) return c; + } + return DEFAULT; + } + + /** A colour of the current accent palette, e.g. {@code R.attr.evAccent}, for code that draws. */ + static int resolve(Context context, int attr) { + TypedValue value = new TypedValue(); + context.getTheme().resolveAttribute(attr, value, true); + return value.data; + } + + /** The colour with its alpha replaced, for glows and grids drawn in code. */ + static int withAlpha(int color, int alpha) { + return (color & 0x00FFFFFF) | (alpha << 24); + } +} diff --git a/app/src/main/java/com/evsuite/abrp/CarColorProbe.java b/app/src/main/java/com/evsuite/abrp/CarColorProbe.java new file mode 100644 index 0000000..3800e07 --- /dev/null +++ b/app/src/main/java/com/evsuite/abrp/CarColorProbe.java @@ -0,0 +1,59 @@ +package com.evsuite.abrp; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Looks for the car's paint colour among the head unit's system properties, for the Logs tab. + * + * The MG launcher draws the car in its own colour, so the head unit knows it somewhere; where is + * not documented. This lists every property whose name or value mentions a colour or paint, so + * a photo of the Logs tab shows whether (and how) it can be read. Read-only: it runs the + * platform's own getprop, which only reads. + */ +final class CarColorProbe { + + private static final Pattern LINE = Pattern.compile("^\\[([^\\]]*)\\]: \\[(.*)\\]$"); + private static final Pattern INTERESTING = Pattern.compile( + "(?i)colou?r|paint|body_?col|exterior|car_?model|vehicle_?(config|type|model)"); + + private CarColorProbe() { } + + /** getprop's output, filtered; at most {@code max} lines. Never throws. */ + static List run(int max) { + try { + Process p = new ProcessBuilder("getprop").redirectErrorStream(true).start(); + StringBuilder out = new StringBuilder(); + try (BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream(), StandardCharsets.UTF_8))) { + String line; + while ((line = r.readLine()) != null && out.length() < 512 * 1024) out.append(line).append('\n'); + } + p.waitFor(); + return filter(out.toString(), max); + } catch (Exception e) { + List failed = new ArrayList<>(); + failed.add("getprop failed: " + e.getClass().getSimpleName()); + return failed; + } + } + + /** The "name = value" lines whose name or value looks colour- or model-related. Pure. */ + static List filter(String getpropOutput, int max) { + List found = new ArrayList<>(); + for (String line : getpropOutput.split("\n")) { + Matcher m = LINE.matcher(line.trim()); + if (!m.matches()) continue; + String name = m.group(1), value = m.group(2); + if (INTERESTING.matcher(name).find() || INTERESTING.matcher(value).find()) { + found.add(name + " = " + value); + if (found.size() >= max) break; + } + } + return found; + } +} diff --git a/app/src/main/java/com/evsuite/abrp/ChargingGraphView.java b/app/src/main/java/com/evsuite/abrp/ChargingGraphView.java index be73a5c..a4c7ccc 100644 --- a/app/src/main/java/com/evsuite/abrp/ChargingGraphView.java +++ b/app/src/main/java/com/evsuite/abrp/ChargingGraphView.java @@ -14,7 +14,7 @@ public final class ChargingGraphView extends View { private final Paint grid = new Paint(1), line = new Paint(1), text = new Paint(1); private final List points = new ArrayList<>(); private final float[] socPower = new float[101]; - public ChargingGraphView(Context c, AttributeSet a) { super(c,a); java.util.Arrays.fill(socPower, Float.NaN); grid.setColor(0x55E0858A); line.setColor(0xFFFFC857); line.setStrokeWidth(4); text.setColor(0xFFBDC4C6); text.setTextSize(20); } + public ChargingGraphView(Context c, AttributeSet a) { super(c,a); java.util.Arrays.fill(socPower, Float.NaN); grid.setColor(AccentColor.withAlpha(AccentColor.resolve(c, R.attr.evAccentLight), 0x55)); line.setColor(0xFFFFC857); line.setStrokeWidth(4); text.setColor(0xFFBDC4C6); text.setTextSize(20); } synchronized void add(Float soc, Float power) { if (soc == null || power == null || power >= 0) return; float p = Math.abs(power); diff --git a/app/src/main/java/com/evsuite/abrp/MainActivity.java b/app/src/main/java/com/evsuite/abrp/MainActivity.java index f9eb258..d86d2ce 100644 --- a/app/src/main/java/com/evsuite/abrp/MainActivity.java +++ b/app/src/main/java/com/evsuite/abrp/MainActivity.java @@ -227,11 +227,13 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES); super.onCreate(savedInstanceState); + prefs = getSharedPreferences("abrp_prefs", MODE_PRIVATE); + // Before anything is inflated: every ?attr/evAccent… resolves against this overlay. + getTheme().applyStyle(AccentColor.fromPref(prefs.getString(AccentColor.PREF_KEY, null)).overlay, true); setContentView(R.layout.activity_main); ((TextView) findViewById(R.id.version_badge)).setText("v" + BuildConfig.VERSION_NAME); - prefs = getSharedPreferences("abrp_prefs", MODE_PRIVATE); // The pages are inflated here, once, and handed to the pager as fixed, // non-recycled items. That is what lets every widget below be looked up now and @@ -259,9 +261,20 @@ public class MainActivity extends AppCompatActivity { statusText = servicePane.findViewById(R.id.status_text); callLogText = logPane.findViewById(R.id.call_log_text); steeringKeysText = logPane.findViewById(R.id.steering_keys_text); + TextView carColorText = logPane.findViewById(R.id.car_color_text); + logPane.findViewById(R.id.car_color_button).setOnClickListener(v -> new Thread(() -> { + java.util.List found = CarColorProbe.run(60); + String shown = found.isEmpty() ? getString(R.string.car_color_none) + : android.text.TextUtils.join("\n", found); + runOnUiThread(() -> carColorText.setText(shown)); + }, "car-color-probe").start()); logPane.findViewById(R.id.flush_now_button).setOnClickListener(v -> manualFlush()); setUpPager(); + // Back on the page that was open when the activity was recreated (accent colour change). + if (savedInstanceState != null) { + ((ViewPager2) findViewById(R.id.content)).setCurrentItem(savedInstanceState.getInt(STATE_PAGE, 0), false); + } findViewById(R.id.about_button).setOnClickListener(v -> showAbout()); findViewById(R.id.update_button).setOnClickListener(v -> checkForUpdate(v)); @@ -275,6 +288,14 @@ public class MainActivity extends AppCompatActivity { startForegroundService(new Intent(this, AbrpUploadService.class)); } + private static final String STATE_PAGE = "page"; + + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putInt(STATE_PAGE, ((ViewPager2) findViewById(R.id.content)).getCurrentItem()); + } + private void showAbout() { String version; try { @@ -710,7 +731,7 @@ public class MainActivity extends AppCompatActivity { code.setTypeface(android.graphics.Typeface.MONOSPACE, android.graphics.Typeface.BOLD); code.setTextSize(36); code.setLetterSpacing(0.15f); - code.setTextColor(getColor(R.color.ev_cyan)); + code.setTextColor(AccentColor.resolve(MainActivity.this, R.attr.evAccentLight)); status = new TextView(MainActivity.this); status.setTextAppearance(R.style.Text_EV_Body); status.setText(startingText); @@ -978,6 +999,7 @@ public class MainActivity extends AppCompatActivity { voiceKeySwitch.setOnCheckedChangeListener((btn, checked) -> prefs.edit().putBoolean(UploadSettings.KEY_VOICE_KEY_OPENS, checked).apply()); bindTireUnit(); + bindAccentColor(); fullScreenSwitch = settingsPane.findViewById(R.id.full_screen_switch); fullScreenSwitch.setChecked(UploadSettings.fullScreen(prefs)); fullScreenSwitch.setOnCheckedChangeListener((btn, checked) -> { @@ -1058,6 +1080,29 @@ public class MainActivity extends AppCompatActivity { }, "abrp-test").start(); } + /** The accent colour; a change recreates the activity so every view takes it. */ + private void bindAccentColor() { + android.widget.Spinner spinner = settingsPane.findViewById(R.id.accent_spinner); + AccentColor[] colors = AccentColor.values(); + String[] labels = new String[colors.length]; + for (int i = 0; i < colors.length; i++) labels[i] = colors[i].label; + android.widget.ArrayAdapter adapter = new android.widget.ArrayAdapter<>( + this, R.layout.spinner_value, labels); + adapter.setDropDownViewResource(R.layout.spinner_dropdown); + spinner.setAdapter(adapter); + AccentColor current = AccentColor.fromPref(prefs.getString(AccentColor.PREF_KEY, null)); + spinner.setSelection(current.ordinal()); + spinner.setOnItemSelectedListener(new android.widget.AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(android.widget.AdapterView parent, View view, int position, long id) { + if (colors[position] == current) return; + prefs.edit().putString(AccentColor.PREF_KEY, colors[position].name()).apply(); + recreate(); + } + @Override public void onNothingSelected(android.widget.AdapterView parent) { } + }); + } + /** Tyre pressure unit: display only, read on every refresh of the Overview. */ private void bindTireUnit() { android.widget.Spinner spinner = settingsPane.findViewById(R.id.tire_unit_spinner); @@ -1388,9 +1433,10 @@ public class MainActivity extends AppCompatActivity { MaterialButton button = consumptionPane.findViewById(id); boolean selected = id == selectedId; button.setSelected(selected); - button.setTextColor(selected ? 0xFFE0424C : COLOR_PENDING); + int accent = AccentColor.resolve(this, R.attr.evAccent); + button.setTextColor(selected ? accent : COLOR_PENDING); button.setStrokeColor(android.content.res.ColorStateList.valueOf( - selected ? 0xFFE0424C : 0xFF3A4143)); + selected ? accent : 0xFF3A4143)); } } diff --git a/app/src/main/java/com/evsuite/abrp/PremiumBackdropView.java b/app/src/main/java/com/evsuite/abrp/PremiumBackdropView.java index fa843b1..b74e90c 100644 --- a/app/src/main/java/com/evsuite/abrp/PremiumBackdropView.java +++ b/app/src/main/java/com/evsuite/abrp/PremiumBackdropView.java @@ -8,7 +8,10 @@ import android.graphics.Shader; import android.util.AttributeSet; import android.view.View; -/** Static, low-opacity light behind the glass panels; no blur passes or animation loop. */ +/** + * Static, low-opacity light behind the glass panels, in the accent colour; no blur passes or + * animation loop. + */ public final class PremiumBackdropView extends View { private final Paint cyan = new Paint(Paint.ANTI_ALIAS_FLAG); private final Paint gold = new Paint(Paint.ANTI_ALIAS_FLAG); @@ -20,10 +23,12 @@ public final class PremiumBackdropView extends View { @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { float radius = Math.max(1, Math.max(w, h) * 0.65f); + int deep = AccentColor.resolve(getContext(), R.attr.evAccentDeep); + int stroke = AccentColor.resolve(getContext(), R.attr.evAccentStroke); cyan.setShader(new RadialGradient(w * 0.70f, 0, radius, - new int[]{0x245B191D, 0x00000000}, null, Shader.TileMode.CLAMP)); + new int[]{AccentColor.withAlpha(deep, 0x48), 0x00000000}, null, Shader.TileMode.CLAMP)); gold.setShader(new RadialGradient(w, h, radius * 0.65f, - new int[]{0x1C8B3A3F, 0x00000000}, null, Shader.TileMode.CLAMP)); + new int[]{AccentColor.withAlpha(stroke, 0x1C), 0x00000000}, null, Shader.TileMode.CLAMP)); } @Override protected void onDraw(Canvas canvas) { diff --git a/app/src/main/res/color/input_stroke.xml b/app/src/main/res/color/input_stroke.xml index 852e4d5..1928860 100644 --- a/app/src/main/res/color/input_stroke.xml +++ b/app/src/main/res/color/input_stroke.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/color/nav_tab_background.xml b/app/src/main/res/color/nav_tab_background.xml index 42a552f..efd63c6 100644 --- a/app/src/main/res/color/nav_tab_background.xml +++ b/app/src/main/res/color/nav_tab_background.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/color/nav_tab_foreground.xml b/app/src/main/res/color/nav_tab_foreground.xml index 64477ea..6abaedc 100644 --- a/app/src/main/res/color/nav_tab_foreground.xml +++ b/app/src/main/res/color/nav_tab_foreground.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/color/nav_tab_stroke.xml b/app/src/main/res/color/nav_tab_stroke.xml index 9a29683..3c88fab 100644 --- a/app/src/main/res/color/nav_tab_stroke.xml +++ b/app/src/main/res/color/nav_tab_stroke.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/color/switch_thumb.xml b/app/src/main/res/color/switch_thumb.xml index deef655..656d80c 100644 --- a/app/src/main/res/color/switch_thumb.xml +++ b/app/src/main/res/color/switch_thumb.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/color/switch_track.xml b/app/src/main/res/color/switch_track.xml index 145e36c..176f030 100644 --- a/app/src/main/res/color/switch_track.xml +++ b/app/src/main/res/color/switch_track.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/drawable/bg_battery_card.xml b/app/src/main/res/drawable/bg_battery_card.xml index 2201dc5..37f6020 100644 --- a/app/src/main/res/drawable/bg_battery_card.xml +++ b/app/src/main/res/drawable/bg_battery_card.xml @@ -1 +1,15 @@ - + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/bg_input_panel.xml b/app/src/main/res/drawable/bg_input_panel.xml index e2b1f97..8eb88fe 100644 --- a/app/src/main/res/drawable/bg_input_panel.xml +++ b/app/src/main/res/drawable/bg_input_panel.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/drawable/bg_topbar.xml b/app/src/main/res/drawable/bg_topbar.xml index 1d5b3ba..1a26e08 100644 --- a/app/src/main/res/drawable/bg_topbar.xml +++ b/app/src/main/res/drawable/bg_topbar.xml @@ -9,7 +9,7 @@ - + diff --git a/app/src/main/res/drawable/bg_version_badge.xml b/app/src/main/res/drawable/bg_version_badge.xml index 81362e0..d87eb68 100644 --- a/app/src/main/res/drawable/bg_version_badge.xml +++ b/app/src/main/res/drawable/bg_version_badge.xml @@ -1,6 +1,6 @@ - - + + diff --git a/app/src/main/res/drawable/ic_chevron_down.xml b/app/src/main/res/drawable/ic_chevron_down.xml index 8cd2a5d..c290ce9 100644 --- a/app/src/main/res/drawable/ic_chevron_down.xml +++ b/app/src/main/res/drawable/ic_chevron_down.xml @@ -2,5 +2,5 @@ + android:strokeColor="?attr/evAccent" android:strokeWidth="1.8" android:strokeLineCap="round" android:strokeLineJoin="round" /> diff --git a/app/src/main/res/drawable/ic_info.xml b/app/src/main/res/drawable/ic_info.xml index 78f93a3..b61bd65 100644 --- a/app/src/main/res/drawable/ic_info.xml +++ b/app/src/main/res/drawable/ic_info.xml @@ -1 +1 @@ - + diff --git a/app/src/main/res/drawable/ic_vehicle_outline.xml b/app/src/main/res/drawable/ic_vehicle_outline.xml index 365da1d..806b126 100644 --- a/app/src/main/res/drawable/ic_vehicle_outline.xml +++ b/app/src/main/res/drawable/ic_vehicle_outline.xml @@ -1,5 +1,5 @@ - - - + + + diff --git a/app/src/main/res/layout-w1000dp/activity_main.xml b/app/src/main/res/layout-w1000dp/activity_main.xml index 9f322f1..9c564a4 100644 --- a/app/src/main/res/layout-w1000dp/activity_main.xml +++ b/app/src/main/res/layout-w1000dp/activity_main.xml @@ -4,7 +4,7 @@ - + @@ -22,7 +22,7 @@ - + diff --git a/app/src/main/res/layout-w1000dp/pane_settings.xml b/app/src/main/res/layout-w1000dp/pane_settings.xml index 8dfb182..12005cd 100644 --- a/app/src/main/res/layout-w1000dp/pane_settings.xml +++ b/app/src/main/res/layout-w1000dp/pane_settings.xml @@ -10,6 +10,8 @@ + + diff --git a/app/src/main/res/layout-w1000dp/pane_vehicle.xml b/app/src/main/res/layout-w1000dp/pane_vehicle.xml index 44a9930..c588ec7 100644 --- a/app/src/main/res/layout-w1000dp/pane_vehicle.xml +++ b/app/src/main/res/layout-w1000dp/pane_vehicle.xml @@ -5,7 +5,7 @@ - + @@ -14,12 +14,12 @@ - + - + @@ -35,22 +35,22 @@ - + - + - + - + @@ -74,18 +74,18 @@ - + - + - + - + diff --git a/app/src/main/res/layout-w600dp/dialog_about.xml b/app/src/main/res/layout-w600dp/dialog_about.xml index d0994a6..73569f8 100644 --- a/app/src/main/res/layout-w600dp/dialog_about.xml +++ b/app/src/main/res/layout-w600dp/dialog_about.xml @@ -4,14 +4,14 @@ - + - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 27ba5ae..376a9f8 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -8,7 +8,7 @@ - + diff --git a/app/src/main/res/layout/dialog_about.xml b/app/src/main/res/layout/dialog_about.xml index 5b4a7ac..d552f4c 100644 --- a/app/src/main/res/layout/dialog_about.xml +++ b/app/src/main/res/layout/dialog_about.xml @@ -2,13 +2,13 @@ - + - + diff --git a/app/src/main/res/layout/pane_charging.xml b/app/src/main/res/layout/pane_charging.xml index 5fab99e..43c34d0 100644 --- a/app/src/main/res/layout/pane_charging.xml +++ b/app/src/main/res/layout/pane_charging.xml @@ -2,7 +2,7 @@ - + @@ -18,7 +18,7 @@ - + diff --git a/app/src/main/res/layout/pane_consumption.xml b/app/src/main/res/layout/pane_consumption.xml index 791c8fb..3f19a5a 100644 --- a/app/src/main/res/layout/pane_consumption.xml +++ b/app/src/main/res/layout/pane_consumption.xml @@ -4,7 +4,7 @@ - + @@ -29,7 +29,7 @@ - + diff --git a/app/src/main/res/layout/pane_log.xml b/app/src/main/res/layout/pane_log.xml index 17f220e..b6ba2e1 100644 --- a/app/src/main/res/layout/pane_log.xml +++ b/app/src/main/res/layout/pane_log.xml @@ -7,5 +7,9 @@ + + + + diff --git a/app/src/main/res/layout/pane_settings.xml b/app/src/main/res/layout/pane_settings.xml index 534f54b..943732d 100644 --- a/app/src/main/res/layout/pane_settings.xml +++ b/app/src/main/res/layout/pane_settings.xml @@ -9,6 +9,8 @@ + + diff --git a/app/src/main/res/layout/pane_vehicle.xml b/app/src/main/res/layout/pane_vehicle.xml index 28d6816..3a27579 100644 --- a/app/src/main/res/layout/pane_vehicle.xml +++ b/app/src/main/res/layout/pane_vehicle.xml @@ -5,7 +5,7 @@ - + @@ -14,27 +14,27 @@ - + - + - + - + - + @@ -43,7 +43,7 @@ - + @@ -69,18 +69,18 @@ - + - + - + - + diff --git a/app/src/main/res/values/accents.xml b/app/src/main/res/values/accents.xml new file mode 100644 index 0000000..b781709 --- /dev/null +++ b/app/src/main/res/values/accents.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/attrs_accent.xml b/app/src/main/res/values/attrs_accent.xml new file mode 100644 index 0000000..518aa16 --- /dev/null +++ b/app/src/main/res/values/attrs_accent.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index c5f6be3..6fdc37f 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,8 +1,7 @@ - + #000000 #121212 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e6e7459..15ab486 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -39,6 +39,11 @@ %1$.1f kW needs a minute of data Tyre pressure unit + Accent colour + CAR COLOUR + Lists the head unit\'s settings that mention a colour, paint or car model, to find out whether the car\'s colour can be read. A photo of this list helps. + Look for the car colour + Nothing colour-related found %1$.1f kWh net, after recuperation once the car is on diff --git a/app/src/main/res/values/styles_app.xml b/app/src/main/res/values/styles_app.xml index cfeef15..1b39cf5 100644 --- a/app/src/main/res/values/styles_app.xml +++ b/app/src/main/res/values/styles_app.xml @@ -39,19 +39,19 @@ 16dp 16dp 16dp - @color/ev_accent + ?attr/evAccent @color/ev_text_secondary @style/Text.EV.Secondary diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index d6cc7f8..9432ab5 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -3,15 +3,23 @@