Skip to content

Migrate Dashboard GridView to RecyclerView, theme gauge colours - #362

Merged
fr3ts0n merged 1 commit into
fr3ts0n:masterfrom
chrisdebian:feat/104-p2-dashboard-recyclerview
Sep 8, 2026
Merged

fr3ts0n merged 1 commit into
fr3ts0n:masterfrom
chrisdebian:feat/104-p2-dashboard-recyclerview

Conversation

@chrisdebian

Copy link
Copy Markdown
Contributor

Continues the Material-migration work tracked in #104 (item 5, device pickers, merged in #360).

What

  • DashBoardActivity's GridView/ArrayAdapter → RecyclerView/GridLayoutManager
  • obd_gauge.xml's hardcoded dark-only gauge colours (#A0000000/#20FFFFFF/#ffffffff) → theme-aware attributes (?attr/colorSurfaceVariant/?attr/colorOutlineVariant/?attr/colorPrimary), fixing contrast in light mode
  • ObdGaugeAdapter gains its own OnItemLongClickListener interface, since RecyclerView has no built-in equivalent to AdapterView.OnItemLongClickListener

Testing

Build/lint/unit tests clean (assembleDebug, lintDebug — no new findings, same pre-existing baseline as before, testDebugUnitTest). Verified on-device (Pixel 10, Android 17): dashboard renders correctly via the new RecyclerView, gauge colours look correct in dark theme, live PV value updates render correctly through the new ViewHolder lookup, and long-press on a gauge still opens PidCustomization correctly.

No new tests added — this is a rendering/adapter-wiring change with no existing unit-test seam in this layer, consistent with the sibling device-picker migration in #360.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TMLp25CwrBe5r1vUrE4jJ5

DashBoardActivity's GridView/ArrayAdapter becomes a RecyclerView with
GridLayoutManager, and obd_gauge.xml's hardcoded dark-only gauge
colours (#A0000000/#20FFFFFF/#ffffffff) become theme-aware attributes
(colorSurfaceVariant/colorOutlineVariant/colorPrimary), fixing
contrast in light mode. ObdGaugeAdapter gains its own
OnItemLongClickListener interface since RecyclerView has no built-in
equivalent to AdapterView.OnItemLongClickListener.

Verified on-device (Pixel 10, Android 17): dashboard renders via the
new RecyclerView, colours look correct in dark theme, live PV updates
render via the new ViewHolder lookup, and long-press on a gauge still
opens PidCustomization.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TMLp25CwrBe5r1vUrE4jJ5
@fr3ts0n
fr3ts0n merged commit 1147e29 into fr3ts0n:master Sep 8, 2026
1 check passed
@chrisdebian
chrisdebian deleted the feat/104-p2-dashboard-recyclerview branch September 9, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants