Skip to content

Replace Material Icons with custom drawable resources#908

Merged
ianthetechie merged 2 commits into
mainfrom
claude/serene-mccarthy-i0h48
May 28, 2026
Merged

Replace Material Icons with custom drawable resources#908
ianthetechie merged 2 commits into
mainfrom
claude/serene-mccarthy-i0h48

Conversation

@ianthetechie

@ianthetechie ianthetechie commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the codebase from using Material Design icons (androidx.compose.material.icons) to custom SVG drawable resources. This removes the dependency on the Material Icons Extended library and centralizes icon management in the ui-shared module.

Key Changes

  • Removed Material Icons dependency: Eliminated androidx.compose.material.icon.extended from build configurations in demo-app and ui-compose modules
  • Replaced icon usage across multiple components:
    • NavigatingInnerGridView: Navigation, Route, Volume Up/Mute icons
    • NavigationUIButton: Close icon
    • NavigationUIZoomButton: Add/Remove (zoom) icons
    • ManeuverInstructionView: Info and Build placeholder icons
    • TripProgressView: Close icon
    • PillDragHandle: Keyboard arrow up icon
    • NotNavigatingOverlay: My Location icon
    • NavigationUIButtonTest: Updated test snapshots
  • Added custom drawable resources in ui-shared/src/main/res/drawable/:
    • navigation_24px.xml
    • route_24px.xml
    • volume_up_24px.xml
    • volume_mute_24px.xml
    • add_24px.xml
    • remove_24px.xml
    • close_24px.xml
    • keyboard_arrow_up_24px.xml
  • Added demo-app drawable: my_location_24px.xml for the location button
  • Updated icon references: Changed from Icons.* to painterResource(SharedR.drawable.*) pattern throughout
  • Updated CarApp icons: Modified InterfaceCarIcons.kt to reference ui-shared resources instead of car-app resources

Implementation Details

  • All custom drawables use Material Design 3 icon specifications (24dp size, white fill with colorControlNormal tint)
  • Icons are loaded using painterResource() with proper resource imports from the shared module
  • Maintains backward compatibility with existing UI appearance and behavior

https://claude.ai/code/session_012TeDMkp8aF2XywjsNZR6H4

Fixes #907.

Replace all androidx.compose.material.icons usages with manually-added
vector drawables and drop the material-icons-extended dependency (which
also transitively pulled material-icons-core). Per Google's guidance this
cuts build times and bundle size; the project uses material3, which does
not bundle the icons packages.

Shared control icons (add, remove, navigation, route, volume mute/up, plus
new close and keyboard_arrow_up) now live in the ui-shared module so both
ui-compose and car-app consume a single copy; the six icons previously
duplicated in car-app are moved there and InterfaceCarIcons now resolves
them from ui-shared. The demo-app-only my_location icon stays in demo-app.

Icons are rendered via painterResource + Icon(tint = ...), matching the
existing ManeuverImage pattern. New drawables use Material Symbols to match
the icons car-app already shipped.

Note: paparazzi snapshots for NavigationUIButtonTest, NavigatingInnerGridViewTest
and TripProgressViewTest (exit variant) must be re-recorded
(just record-android-snapshots) since the rendered glyphs change.

https://claude.ai/code/session_012TeDMkp8aF2XywjsNZR6H4
@ianthetechie
ianthetechie requested a review from Archdoog May 27, 2026 03:09
@ianthetechie
ianthetechie merged commit 5d98b9e into main May 28, 2026
14 checks passed
@ianthetechie
ianthetechie deleted the claude/serene-mccarthy-i0h48 branch May 28, 2026 05:04
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.

Remove material icons

3 participants