🎨 Assets | Add adaptive icon foreground and background drawables - #29
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note
|
| Layer / File(s) | Summary |
|---|---|
Background and foreground launcher drawables android/app/src/main/res/drawable/ic_launcher_background.xml, android/app/src/main/res/drawable/ic_launcher_foreground.xml |
Background drawable sets a solid #F1EDE9 shape fill; foreground vector drawable defines two rounded-stroke paths with a shared #FD8161→#FF5A5F linear gradient stroke in a 108dp×108dp, 612×612-viewport asset. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly matches the change: adding Android adaptive icon foreground and background drawables. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
refactor/use-adaptive-icon
Comment @coderabbitai help to get the list of available commands.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ent apps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add tools:targetApi="21" to foreground vector drawable so Lint respects flutter.minSdkVersion instead of assuming API 1. Remove invalid viewport attributes from background shape drawable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ic_launcher_round.xml (adaptive) and re-wire android:roundIcon in the manifest. Overview/recents screen uses roundIcon on many devices — pointing it to the adaptive descriptor fixes the non-adaptive icon without needing PNG fallbacks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Override onResume in MainActivity to explicitly call setTaskDescription with the ic_launcher resource ID. Without this, Android creates the task description from a flattened Bitmap of the PNG mipmaps, bypassing the adaptive icon XML and showing a non-adaptive icon in the overview screen. Handles API 33+ (TaskDescription.Builder) and API 28–32 (deprecated ctor). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on natively The setTaskDescription override was causing Android to load ic_launcher as a PNG bitmap, bypassing the adaptive XML. Without the override, the system correctly uses android:roundIcon → mipmap-anydpi-v26/ic_launcher_round.xml, displaying the adaptive icon in the overview screen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🎯 Why?
The Android adaptive icon was missing proper foreground and background drawables, causing the app to display a generic icon on devices that support adaptive icons (Android 8+).
🏷️ Type of Change
📦 What Changed?
android/app/src/main/res/drawable/ic_launcher_background.xml— solid background shape using the app's cream color (#F1EDE9)android/app/src/main/res/drawable/ic_launcher_foreground.xml— vector foreground with the two Moveflix wave strokes, rendered as a 108dp adaptive icon canvas (612×612 viewport) with the brand gradient (#FD8161→#FF5A5F)📷 Screenshots (required for UI changes)
🧪 Testing (required for code changes)
📱 Platforms Tested
✔️ Verification
📝 Test Scenarios
🔗 Reference Links (optional)
🔄 Dependencies (optional)
✅ Checklist
🔀 Merge Rules
Summary by CodeRabbit