← Back to Pull requests

Use the Android template's Material 3 defaults, and document day/night colors #3168

Open
unknown opened this pull request with 278 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 30, 2026 03:29 UTC
Author

This PR depends on beeware/briefcase-android-gradle-template#137, and should be merged with or after it.

Toga's Android backend is moving to Material 3, with buttons filled with colorPrimary and labelled in colorOnPrimary. beeware/briefcase-android-gradle-template#137 updates the Android template for that:

the default base_theme is now Theme.Material3.DayNight;
the Material Components library (com.google.android.material:material:1.13.0) is always linked;
primary_color, primary_color_dark and accent_color can each be a single color, or a {day = "...", night = "..."} table;
a new primary_text_color setting (colorOnPrimary), defaulting to #FFFFFF, keeps button text readable in dark mode.

This PR updates Briefcase to match:

Toga bootstrap: no longer sets base_theme or adds the Material library, as the template now provides both. build_gradle_dependencies is kept, empty apart from the commented hints, so Briefcase doesn't fall back to its legacy default dependency list. Merged before the template PR, this would give new Toga apps an AppCompat theme without the Material library.
Android Gradle reference: documents the day/night tables, primary_text_color, the new base_theme default, and the always-linked libraries. Also corrects primary_color's description: Material 3 themes color the app bar with the theme's surface color, not the primary color.

  • Change notes: two features, and a backward-incompatible note: apps that don't set base_theme will look different after their next briefcase create.
  • The color tables need no Briefcase code: app settings reach the template context unchanged. The template PR has the emulator verification. Generating the Material 3 color scheme from a seed color is tracked separately in #3167.

    PR Checklist:


    <!--- Go over all the following points, and put an x in all the boxes that apply. -->
  • I will abide by the BeeWare Code of Conduct

  • I have read and have followed the [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) file

  • This PR was generated or assisted using an AI tool

  • <!-- update or delete the next line to reflect your usage -->
    Assisted-by: Claude Code (Claude Opus 5.5)

    Diff: 278 lines (+208 / -70) across 3 files Reviewer: kattni Review duration: 2296m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 278 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.337
    Real PR Conversation Timeline
    1 comments
    "Review active on #3168"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.6% · Safe to merge
    22.6%