App 2.24.1: remove the header line above the pages

The title and subtitle above every tab are gone; the pages start at
the top and gain about 45 dp. Their strings are removed. Emulator only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-24 20:23:45 +02:00
co-authored by Claude Opus 5.5
parent 5fb367d7cd
commit ef296683aa
7 changed files with 8 additions and 41 deletions
+5
View File
@@ -131,6 +131,11 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does *
confirmed car facts, app structure, UI conventions, build/test/ship, documents. It replaces confirmed car facts, app structure, UI conventions, build/test/ship, documents. It replaces
upstream's EVABRPUploader text. The test emulator is now in the flake: `nix run .#car-emulator` upstream's EVABRPUploader text. The test emulator is now in the flake: `nix run .#car-emulator`
(Android 9 AOSP at 1920×720, 160 dpi; the car build installs as the system user — checked). (Android 9 AOSP at 1920×720, 160 dpi; the car build installs as the system user — checked).
- 2026-10-24 — App 2.24.1 (branch `styles-retro-future`): the line of text above every page
("Your drive at a glance.", "Settings. Display, battery…" and so on) is gone, at the owner's
request; the pages start at the top, level with the sidebar, and gain about 45 dp. Its 14
strings and the title arrays are removed. Checked on the emulator: no crash, and every tab
still fits 1778×640 without scrolling. Not tried on the car.
- 2026-10-24 — App 2.24.0 (branch `styles-retro-future`): three more Overview styles, each one - 2026-10-24 — App 2.24.0 (branch `styles-retro-future`): three more Overview styles, each one
Canvas view fed the shared `ClusterValues` (now with the tyre pressures, formatted in the Canvas view fed the shared `ClusterValues` (now with the tyre pressures, formatted in the
chosen unit). **Sci-fi** (`SciFiView`): a starship console — rounded elbow frames in orange chosen unit). **Sci-fi** (`SciFiView`): a starship console — rounded elbow frames in orange
+2 -2
View File
@@ -34,8 +34,8 @@ android {
applicationId "com.stinnesbeck.nilsmg4" applicationId "com.stinnesbeck.nilsmg4"
minSdk 27 minSdk 27
targetSdk 36 targetSdk 36
versionCode 117 versionCode 118
versionName "2.24.0" versionName "2.24.1"
// Nothing about the server ships in the APK: its URL and ingest token are entered in // 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. // the app's Server tab (ServerConfig), and the database is only reachable by the server.
@@ -42,16 +42,6 @@ public class MainActivity extends AppCompatActivity {
{ R.id.tabVehicle, R.id.tabConsumption, R.id.tabCharging, R.id.tabService, R.id.tabServer, { R.id.tabVehicle, R.id.tabConsumption, R.id.tabCharging, R.id.tabService, R.id.tabServer,
R.id.tabSettings, R.id.tabLog }; R.id.tabSettings, R.id.tabLog };
private static final int[] PAGE_TITLES = {
R.string.design_overview_title, R.string.consumption_title, R.string.charging_title,
R.string.design_service_title, R.string.design_server_title, R.string.design_settings_title,
R.string.design_log_title
};
private static final int[] PAGE_SUBTITLES = {
R.string.design_overview_subtitle, R.string.consumption_subtitle, R.string.charging_subtitle,
R.string.design_service_subtitle, R.string.design_server_subtitle, R.string.design_settings_subtitle,
R.string.design_log_subtitle
};
// Status colours come from the palette, not from the Material swatches: #4CAF50 and // Status colours come from the palette, not from the Material swatches: #4CAF50 and
// #F44336 sit around 4:1 on this background, which disappears behind a sunlit // #F44336 sit around 4:1 on this background, which disappears behind a sunlit
@@ -202,7 +192,7 @@ public class MainActivity extends AppCompatActivity {
} }
/** /**
* Marks the destination and labels the page on screen. * Marks the destination in the navigation (the pages have no header line).
* *
* Only isSelected is set: fill, text, icon and stroke come from the * Only isSelected is set: fill, text, icon and stroke come from the
* res/color/nav_tab_*.xml selectors applied by the Widget.EV.NavTab style. isSelected * res/color/nav_tab_*.xml selectors applied by the Widget.EV.NavTab style. isSelected
@@ -212,8 +202,6 @@ public class MainActivity extends AppCompatActivity {
for (int i = 0; i < TAB_IDS.length; i++) { for (int i = 0; i < TAB_IDS.length; i++) {
findViewById(TAB_IDS[i]).setSelected(i == position); findViewById(TAB_IDS[i]).setSelected(i == position);
} }
((TextView) findViewById(R.id.header_title)).setText(PAGE_TITLES[position]);
((TextView) findViewById(R.id.header_subtitle)).setText(PAGE_SUBTITLES[position]);
} }
/** Background thread for the one system-setting write (clearCarPlayFullScreen). */ /** Background thread for the one system-setting write (clearCarPlayFullScreen). */
@@ -16,12 +16,6 @@
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="vertical">
<!-- One compact line: the Overview has to fit the car's 1778×720 px window (about 640 dp for
layouts). Version, update check and About are on the Settings tab. -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:baselineAligned="true" android:paddingStart="24dp" android:paddingEnd="24dp" android:paddingTop="10dp" android:paddingBottom="2dp">
<TextView android:id="@+id/header_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/design_overview_title" android:textAppearance="@style/Text.EV.Title" android:textSize="24sp" android:maxLines="1" />
<TextView android:id="@+id/header_subtitle" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:text="@string/design_overview_subtitle" android:textAppearance="@style/Text.EV.Secondary" android:maxLines="1" android:ellipsize="end" />
</LinearLayout>
<androidx.viewpager2.widget.ViewPager2 android:id="@+id/content" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> <androidx.viewpager2.widget.ViewPager2 android:id="@+id/content" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@@ -2,12 +2,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/app_root" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" android:background="@color/ev_background"> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/app_root" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" android:background="@color/ev_background">
<com.evsuite.abrp.PremiumBackdropView android:layout_width="match_parent" android:layout_height="match_parent"/> <com.evsuite.abrp.PremiumBackdropView android:layout_width="match_parent" android:layout_height="match_parent"/>
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<!-- One compact line: the Overview has to fit the car's 1778×720 px window (about 640 dp for
layouts). Version, update check and About are on the Settings tab. -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:baselineAligned="true" android:paddingStart="24dp" android:paddingEnd="24dp" android:paddingTop="10dp" android:paddingBottom="2dp">
<TextView android:id="@+id/header_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/design_overview_title" android:textAppearance="@style/Text.EV.Title" android:textSize="24sp" android:maxLines="1" />
<TextView android:id="@+id/header_subtitle" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:text="@string/design_overview_subtitle" android:textAppearance="@style/Text.EV.Secondary" android:maxLines="1" android:ellipsize="end" />
</LinearLayout>
<androidx.viewpager2.widget.ViewPager2 android:id="@+id/content" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/> <androidx.viewpager2.widget.ViewPager2 android:id="@+id/content" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/>
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="8dp" android:background="@drawable/bg_sidebar"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="8dp" android:background="@drawable/bg_sidebar">
<com.google.android.material.button.MaterialButton android:id="@+id/tabVehicle" style="@style/Widget.EV.NavTab.Compact" android:layout_width="0dp" android:layout_height="76dp" android:layout_weight="1" android:text="@string/tab_vehicle" app:icon="@drawable/ic_tab_vehicle"/> <com.google.android.material.button.MaterialButton android:id="@+id/tabVehicle" style="@style/Widget.EV.NavTab.Compact" android:layout_width="0dp" android:layout_height="76dp" android:layout_weight="1" android:text="@string/tab_vehicle" app:icon="@drawable/ic_tab_vehicle"/>
-4
View File
@@ -6,10 +6,6 @@
<string name="tab_vehicle">Overview</string> <string name="tab_vehicle">Overview</string>
<string name="tab_consumption">Consumption</string> <string name="tab_consumption">Consumption</string>
<string name="tab_charging">Charging</string> <string name="tab_charging">Charging</string>
<string name="consumption_title">Consumption</string>
<string name="consumption_subtitle">Since start, motor, lifetime and trip counters</string>
<string name="charging_title">Charging</string>
<string name="charging_subtitle">Live battery values and SOC/power curve</string>
<string name="tab_server">Server</string> <string name="tab_server">Server</string>
<string name="tab_settings">Settings</string> <string name="tab_settings">Settings</string>
<string name="tab_log">Logs</string> <string name="tab_log">Logs</string>
@@ -5,16 +5,6 @@
<string name="design_brand">MG&#x2074;</string> <string name="design_brand">MG&#x2074;</string>
<string name="design_brand_caption">Nils&#x2019; MG4</string> <string name="design_brand_caption">Nils&#x2019; MG4</string>
<string name="design_brand_footer">ON THE ROAD, ELECTRIC</string> <string name="design_brand_footer">ON THE ROAD, ELECTRIC</string>
<string name="design_overview_title">Your drive at a glance.</string>
<string name="design_overview_subtitle">Data from your car, all in one place.</string>
<string name="design_server_title">Where your data goes.</string>
<string name="design_server_subtitle">Your own server stores it; the car sends live data to ABRP itself.</string>
<string name="design_service_title">Live data.</string>
<string name="design_service_subtitle">Where your car\'s live data goes, and how often.</string>
<string name="design_settings_title">Settings.</string>
<string name="design_settings_subtitle">Display, battery, charging price and updates.</string>
<string name="design_log_title">Every upload, right here.</string>
<string name="design_log_subtitle">Status and details of recent uploads.</string>
<string name="design_battery">BATTERY</string> <string name="design_battery">BATTERY</string>
<string name="design_energy">VEHICLE INFO</string> <string name="design_energy">VEHICLE INFO</string>
<string name="design_tires">TIRE PRESSURES</string> <string name="design_tires">TIRE PRESSURES</string>