Use Material buttons on Android, and require a Material 3 theme #4914
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4914"
general
weight: 0.35
kattni
Refs #2250.
This is the first step in moving Toga's Android backend to Material 3, one widget at a time. It converts
Button, and makes the Material library and a Material 3 theme requirements oftoga-android. Converting the rest of the widgets will continue under #2250.Changes
Buttonis now acom.google.android.material.button.MaterialButton, so it follows the app's Material theme. A background color is applied as a background tint, andTRANSPARENTresets the tint to the theme's default.Widget.set_background_filter()was only used byButton, so it has been removed.toga-androidnow requires the Material package (com.google.android.material:material:1.12.0or later) and a Material 3 base theme, such asTheme.Material3.DayNight. If the app's theme is a Material 2 theme (for exampleTheme.MaterialComponents.Light.DarkActionBar), the app issues aFutureWarningwhen it starts. There is no Material 2 support code; this is intended to land as part of a major version change. If the Material package is missing, creating aButtonraises aRuntimeError, asOptionContaineralready does.base_themeis nowTheme.Material3.DayNight.Buttondocs describe the new requirements.Dependencies
This PR depends on beeware/briefcase#3168 and beeware/briefcase-android-gradle-template#137, which are both still in review. Together, they give new Briefcase projects a
Theme.Material3.DayNightbase theme, the Material dependency, and day/night colors. Toga doesn't need them to work: an app that sets a Material 3base_themeand declares the Material dependency inbuild_gradle_dependenciesworks with this PR today, as the testbed does.Testing
Backends exercised: Android, with the full testbed on an API 31 emulator (
beePhone, as in CI), usingTheme.Material3.DayNight: 514 passed, 99 skipped, 56 xfailed, 6 xpassed, with 100.0% coverage. The core test suite passes with 100% coverage, andpre-commit run --all-filespasses.The Material 2 warning branch is marked
# pragma: no cover, because the testbed can only run with one theme.PR Checklist:
<!--- Go over all the following points, and put an
xin all the boxes that apply. --><!-- update or delete the next line to reflect your usage -->
Assisted-by: Claude Code (Claude Opus 5.5)