fix: add themed launcher icon support#40
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds monochrome launcher icon support to enable Android's themed icon system. A new white vector drawable is created and then referenced by both the standard and round launcher icon adaptive-icon configurations. ChangesMonochrome launcher icon support
🎯 2 (Simple) | ⏱️ ~8 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a monochrome adaptive launcher icon by adding a new vector asset and referencing it in both the standard and round launcher configuration files. The reviewer recommends moving the monochrome icon asset from the drawable directory to a mipmap directory (and updating the corresponding references) to ensure the launcher icon is not stripped or downscaled during the Android App Bundle (AAB) generation process.
| <background android:drawable="@color/ic_launcher_background"/> | ||
| <foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
| </adaptive-icon> No newline at end of file | ||
| <monochrome android:drawable="@drawable/ic_launcher_monochrome"/> |
There was a problem hiding this comment.
Launcher icon assets (including monochrome adaptive icon layers) should be placed in the mipmap resource directories rather than drawable directories.
When building Android App Bundles (AABs), resources in drawable folders can be stripped or downscaled based on the target device's screen density. However, launchers often require higher-density icons than the device's default density (e.g., for zoom effects or larger grid layouts). Placing launcher assets in mipmap ensures they are preserved across all densities and avoids potential resource-not-found crashes or pixelation.
Please move ic_launcher_monochrome.xml to app/src/main/res/mipmap/ (or mipmap-anydpi-v26/) and update this reference to @mipmap/ic_launcher_monochrome.
| <monochrome android:drawable="@drawable/ic_launcher_monochrome"/> | |
| <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/> |
| <background android:drawable="@color/ic_launcher_background"/> | ||
| <foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
| </adaptive-icon> No newline at end of file | ||
| <monochrome android:drawable="@drawable/ic_launcher_monochrome"/> |
There was a problem hiding this comment.
Launcher icon assets (including monochrome adaptive icon layers) should be placed in the mipmap resource directories rather than drawable directories.
When building Android App Bundles (AABs), resources in drawable folders can be stripped or downscaled based on the target device's screen density. However, launchers often require higher-density icons than the device's default density (e.g., for zoom effects or larger grid layouts). Placing launcher assets in mipmap ensures they are preserved across all densities and avoids potential resource-not-found crashes or pixelation.
Please move ic_launcher_monochrome.xml to app/src/main/res/mipmap/ (or mipmap-anydpi-v26/) and update this reference to @mipmap/ic_launcher_monochrome.
| <monochrome android:drawable="@drawable/ic_launcher_monochrome"/> | |
| <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/> |
| @@ -0,0 +1,10 @@ | |||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |||
There was a problem hiding this comment.
This monochrome launcher icon asset should be placed in a mipmap directory (e.g., app/src/main/res/mipmap/ or app/src/main/res/mipmap-anydpi-v26/) instead of drawable/.
Using mipmap folders for launcher icons ensures that they are not stripped or downscaled during the Android App Bundle (AAB) generation process, which is critical for maintaining high-quality launcher icons across different device densities.
Closes #2
Summary
Issue Evidence
backgroundandforeground, so Android 13+ has nomonochromelayer to tint.Verification
git diff --check— passed.gradlew.bat :app:processDebugResources— blocked becauseJAVA_HOME/javaare unavailable in this shell.Community Rules Review
Summary by CodeRabbit