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:
+2
-2
@@ -34,8 +34,8 @@ android {
|
||||
applicationId "com.stinnesbeck.nilsmg4"
|
||||
minSdk 27
|
||||
targetSdk 36
|
||||
versionCode 117
|
||||
versionName "2.24.0"
|
||||
versionCode 118
|
||||
versionName "2.24.1"
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -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.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
|
||||
// #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
|
||||
* 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++) {
|
||||
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). */
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
<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" />
|
||||
</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">
|
||||
<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">
|
||||
<!-- 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"/>
|
||||
<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"/>
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
<string name="tab_vehicle">Overview</string>
|
||||
<string name="tab_consumption">Consumption</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_settings">Settings</string>
|
||||
<string name="tab_log">Logs</string>
|
||||
|
||||
@@ -5,16 +5,6 @@
|
||||
<string name="design_brand">MG⁴</string>
|
||||
<string name="design_brand_caption">Nils’ MG4</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_energy">VEHICLE INFO</string>
|
||||
<string name="design_tires">TIRE PRESSURES</string>
|
||||
|
||||
Reference in New Issue
Block a user