Skip to content

fix: Fix MaterialThemeFromXml conversion - #880

Merged
LouisCAD merged 2 commits into
mainfrom
fix-material-theme-conversion
Oct 28, 2026
Merged

LouisCAD merged 2 commits into
mainfrom
fix-material-theme-conversion

Conversation

@LouisCAD

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 10:47
@LouisCAD
LouisCAD enabled auto-merge October 28, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The fallback treats valid transparent ARGB values (0) as missing, replacing explicitly configured XML colors instead of applying only to unresolved attributes.

1 open issue
What changed in this PR

This PR adjusts how the shared Compose theme adapter converts XML theme colors into a Material color scheme.

Changes:

  • Uses Android’s colorBackground attribute for the background color.
  • Reuses onSurface as the fallback for onBackground.
  • Adds fallback support to the color lookup helper.
File Description
Ui/​Compose/​MaterialThemeFromXml/​src/​main/​kotlin/​com/​infomaniak/​core/​ui/​compose/​materialthemefromxml/​MaterialThemeFromXml.kt Updates XML color mapping and fallback handling.

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, and the change is limited to the intended XML background mapping and safer Material color fallbacks.

No open issues 🎉

1 resolved since last review

Review effort: Lite

@LouisCAD
LouisCAD merged commit caac315 into main Oct 28, 2026
10 checks passed
@LouisCAD
LouisCAD deleted the fix-material-theme-conversion branch October 28, 2026 11:58
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.

3 participants