-
Couldn't load subscription status.
- Fork 46
fix: restore adaptive icon support removed in PR #147 #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit restores Android adaptive icon functionality that was removed in PR #147. The adaptive icon provides better integration with Android 8.0+ (API 26+) launcher features including: - Shape masking (circle, squircle, rounded square, etc.) - Visual effects and animations - Themed icons support (Android 13+) Changes: - Add ic_launcher_foreground.xml using the V2er logo vector - Add ic_launcher_monochrome.xml for themed icon support - Restore mipmap-anydpi-v26 adaptive icon configurations - Support both regular and round adaptive icons The foreground icon is derived from app/src/main/res/drawable/logo_svg.xml to maintain consistency with the app's branding. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Restores adaptive icon support removed in PR #147 to ensure proper rendering on Android 8.0+ and themed icon compatibility on Android 13+.
Key changes:
- Reintroduced adaptive icon XMLs (ic_launcher.xml, ic_launcher_round.xml) with foreground, background, and monochrome layers.
- Added vector foreground (ic_launcher_foreground.xml) and monochrome (ic_launcher_monochrome.xml) drawables.
- Configured monochrome layer to enable themed icon support.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | Adds adaptive icon definition (background, foreground, monochrome). |
| app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml | Adds round adaptive icon definition mirroring standard launcher icon. |
| app/src/main/res/drawable/ic_launcher_foreground.xml | Adds vector drawable used as adaptive icon foreground. |
| app/src/main/res/drawable/ic_launcher_monochrome.xml | Adds monochrome vector drawable for themed icon support. |
Comments suppressed due to low confidence (2)
| android:scaleX="0.3" | ||
| android:scaleY="0.3" | ||
| android:translateX="21.6" | ||
| android:translateY="21.6"> |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same scaling/translation issue as foreground drawable; the monochrome path will also be clipped outside the viewport. Align its scale/position with corrected foreground values to ensure consistent themed icon rendering.
| android:scaleX="0.3" | |
| android:scaleY="0.3" | |
| android:translateX="21.6" | |
| android:translateY="21.6"> | |
| android:scaleX="0.125" | |
| android:scaleY="0.125" | |
| android:translateX="0" | |
| android:translateY="0"> |
| <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <background android:drawable="@color/ic_launcher_background" /> | ||
| <foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
| <monochrome android:drawable="@drawable/ic_launcher_monochrome" /> |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate of ic_launcher.xml; if not required for legacy round icon fallback, remove to avoid redundant maintenance. If retention is intentional, add a brief comment explaining why both are needed.
Replace hardcoded black color with @color/splash_logo_color reference to ensure proper theme support and consistency with the app's branding. The splash_logo_color is #FF111214 (dark gray) for light theme and #FFFFFFFF (white) for dark theme.
- Restore the original adaptive icon structure with white background rectangle - Use the new V logo from logo_svg.xml instead of old design - Properly scale and center the logo within the 108dp canvas - White background (#FFFFFF) provides better contrast than light gray - Monochrome icon updated for Android 13+ themed icon support
- Increased logo scale from 0.04 to 0.045 for better visibility - Improved centering with translateX/Y adjusted to 31.5 - Added night mode variant with inverted colors (dark background, white logo) - Fixed dark mode visibility issue where logo was invisible - Use hardcoded colors for better consistency
Summary
This PR restores Android adaptive icon functionality that was removed in PR #147.
Problem
PR #147 deleted the adaptive icon XML files (
ic_launcher_foreground.xml,ic_launcher_monochrome.xml, andmipmap-anydpi-v26/ic_launcher*.xml), causing the app to lose adaptive icon support on Android 8.0+ devices.Without adaptive icons, the app:
Solution
This PR restores the adaptive icon support by:
ic_launcher_foreground.xml- Vector drawable for the icon foreground using the V2er logo fromlogo_svg.xmlic_launcher_monochrome.xml- Monochrome version for themed icons (Android 13+)mipmap-anydpi-v26/ic_launcher.xml- Adaptive icon configuration for regular iconsmipmap-anydpi-v26/ic_launcher_round.xml- Adaptive icon configuration for round iconsTechnical Details
app/src/main/res/drawable/logo_svg.xml@color/ic_launcher_background(#EEEEEE)Testing
./gradlew assembleDebugRelated Issues
Fixes the issue caused by: https://github.com/v2er-app/Android/pull/147/files
🤖 Generated with Claude Code