Skip to content

Conversation

@graycreate
Copy link
Member

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, and mipmap-anydpi-v26/ic_launcher*.xml), causing the app to lose adaptive icon support on Android 8.0+ devices.

Without adaptive icons, the app:

  • Cannot adapt to different launcher icon shapes (circle, squircle, rounded square, etc.)
  • Misses out on launcher visual effects and animations
  • Doesn't support themed icons on Android 13+

Solution

This PR restores the adaptive icon support by:

  1. Creating ic_launcher_foreground.xml - Vector drawable for the icon foreground using the V2er logo from logo_svg.xml
  2. Creating ic_launcher_monochrome.xml - Monochrome version for themed icons (Android 13+)
  3. Restoring mipmap-anydpi-v26/ic_launcher.xml - Adaptive icon configuration for regular icons
  4. Restoring mipmap-anydpi-v26/ic_launcher_round.xml - Adaptive icon configuration for round icons

Technical Details

  • The foreground icon uses the same vector path data from app/src/main/res/drawable/logo_svg.xml
  • Scaled and positioned appropriately for the 108dp adaptive icon canvas
  • Background color uses the existing @color/ic_launcher_background (#EEEEEE)
  • Supports all Android adaptive icon features from API 26+

Testing

  • ✅ Build successful with ./gradlew assembleDebug
  • Should be tested on Android 8.0+ devices to verify icon appearance
  • Should be tested on Android 13+ devices to verify themed icon support

Related Issues

Fixes the issue caused by: https://github.com/v2er-app/Android/pull/147/files

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings October 19, 2025 03:14
Copy link

Copilot AI left a 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)

Comment on lines 7 to 10
android:scaleX="0.3"
android:scaleY="0.3"
android:translateX="21.6"
android:translateY="21.6">
Copy link

Copilot AI Oct 19, 2025

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.

Suggested change
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">

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +5
<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" />
Copy link

Copilot AI Oct 19, 2025

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.

Copilot uses AI. Check for mistakes.
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
@graycreate graycreate closed this Oct 19, 2025
@graycreate graycreate deleted the bugfix/restore-adaptive-icon branch October 19, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants