Files
mg4/app/src/main/res/values/styles_ev.xml
T
nilsandClaude Opus 5.5 79bcfa05f6 App 2.16.4: drop-downs that keep full screen
Back to drop-downs for upload frequency, tyre pressure unit and accent
colour, as Material exposed dropdown menus instead of Spinners. A
Spinner's list is a focusable window of its own without the
full-screen flags, so the car showed its bars while it was open; an
exposed dropdown's list leaves the focus with the activity, so the app
stays full screen. Styled like the other input fields, with full-height
rows. Replaces the buttons of 2.16.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
2026-10-18 20:11:25 +02:00

101 lines
5.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EVABRPUploader components. The user-requested OLED theme intentionally
overrides the shared EVSuite tokens; see AGENTS.md for the local design direction. -->
<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="android:textAllCaps">false</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:letterSpacing">0.01</item>
<item name="backgroundTint">?attr/evAccent</item>
<item name="android:textColor">?attr/evOnAccent</item>
<item name="elevation">0dp</item>
<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="android:textAllCaps">false</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="backgroundTint">@color/ev_surface_raised</item>
<item name="strokeColor">@color/ev_outline</item>
<item name="android:textColor">@color/ev_text_primary</item>
<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">?attr/evAccent</item>
<item name="android:letterSpacing">0.12</item>
<item name="android:textStyle">bold</item>
</style>
<!-- Shared typography base; the overview uses larger hero and metric variants. -->
<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:fontFamily">sans-serif-medium</item>
<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>
<!-- Rounded corners echo the glass panels without making every button a pill. -->
<style name="ShapeAppearanceOverlay.EV.Button" parent="">
<item name="cornerSize">18dp</item>
</style>
</resources>