Repository navigation
feat: android icon - #9
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Android app icon resources using adaptive icons with vector drawables and updates the minimum SDK requirement. The changes introduce the app name "MarkDay" and custom icon graphics depicting a notebook with a bookmark ribbon.
Key changes:
- Adds adaptive icon configuration with vector drawable assets for launcher background and foreground
- Adds app name string resource ("MarkDay")
- Raises minimum Android SDK from 24 to 33
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/libs.versions.toml | Increases minimum SDK from 24 (Android 7.0) to 33 (Android 13) |
| composeApp/src/androidMain/res/values/strings.xml | Adds app name string resource for launcher display |
| composeApp/src/androidMain/res/mipmap-anydpi/ic_launcher.xml | Defines adaptive launcher icon configuration |
| composeApp/src/androidMain/res/mipmap-anydpi/ic_launcher_round.xml | Defines adaptive round launcher icon configuration |
| composeApp/src/androidMain/res/drawable/ic_launcher_foreground.xml | Provides vector drawable for icon foreground (notebook with bookmark design) |
| composeApp/src/androidMain/res/drawable/ic_launcher_background.xml | Provides vector drawable for icon background (light mint color) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| android:pathData="M5.5,3 H18.5 A2.5,2.5 0 0 1 21,5.5 V19.5 A2.5,2.5 0 0 1 18.5,22 H5.5 A2.5,2.5 0 0 1 3,19.5 V5.5 A2.5,2.5 0 0 1 5.5,3 Z" /> | ||
| <path | ||
| android:fillColor="#17B56A" | ||
| android:pathData="M14,3 H16 V12 L15,11 L14,12 Z" /> |
There was a problem hiding this comment.
The foreground icon paths extend beyond the safe zone for adaptive icons. According to Android's adaptive icon guidelines, content should stay within a centered 66dp diameter circle (or 16dp in a 24dp viewport). The path on line 10 extends to x=21, and line 8's path extends to x=20, both of which are outside the safe zone (should stay roughly within x=4 to x=20 for centered content with radius ~8). This may cause the icon to be clipped on devices with different icon shapes (circle, squircle, rounded square, etc.). Consider scaling down the icon design to fit within the safe zone to ensure it displays correctly on all devices.
| android:pathData="M5.5,3 H18.5 A2.5,2.5 0 0 1 21,5.5 V19.5 A2.5,2.5 0 0 1 18.5,22 H5.5 A2.5,2.5 0 0 1 3,19.5 V5.5 A2.5,2.5 0 0 1 5.5,3 Z" /> | |
| <path | |
| android:fillColor="#17B56A" | |
| android:pathData="M14,3 H16 V12 L15,11 L14,12 Z" /> | |
| android:pathData="M6,4 H18 A2.5,2.5 0 0 1 20,6 V18 A2.5,2.5 0 0 1 18,20 H6 A2.5,2.5 0 0 1 4,18 V6 A2.5,2.5 0 0 1 6,4 Z" /> | |
| <path | |
| android:fillColor="#17B56A" | |
| android:pathData="M14,4 H16 V13 L15,12 L14,13 Z" /> |
| agp = "8.11.2" | ||
| android-compileSdk = "36" | ||
| android-minSdk = "24" | ||
| android-minSdk = "33" |
There was a problem hiding this comment.
Raising the minimum SDK from 24 (Android 7.0) to 33 (Android 13) is a significant change that excludes a large portion of potential users. Android SDK 24 covers devices from 2016 onwards, while SDK 33 only covers devices from 2022 onwards. This change could significantly reduce the app's addressable market. Unless there's a specific API or feature requirement that necessitates SDK 33, consider keeping the minSdk at 24 or choosing a more moderate increase (e.g., to SDK 26 or 28). Review the codebase to identify if any Android 13-specific APIs are being used that would justify this requirement.
| <?xml version="1.0" encoding="utf-8"?> | ||
| <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <background android:drawable="@drawable/ic_launcher_background" /> | ||
| <foreground android:drawable="@drawable/ic_launcher_foreground" /> | ||
| </adaptive-icon> No newline at end of file |
There was a problem hiding this comment.
The launcher icons are defined using only adaptive icons (mipmap-anydpi) with vector drawables, which requires Android 8.0 (API 26) or higher. If the minimum SDK is lowered from 33 to 24 (as recommended in another comment), you'll need to provide fallback PNG icon assets in density-specific folders (mipmap-mdpi, mipmap-hdpi, mipmap-xhdpi, mipmap-xxhdpi, mipmap-xxxhdpi) for devices running Android 7.0-7.1. These older devices don't support adaptive icons and will fail to display the app icon correctly without raster fallbacks.
This pull request adds essential resources and updates configuration for the Android app, focusing on app icon assets and minimum SDK requirements. The most important changes are grouped below:
App Icon Assets:
ic_launcher_background.xml) and foreground (ic_launcher_foreground.xml), providing custom icon graphics. [1] [2]ic_launcher.xmlandic_launcher_round.xml) that combine the new background and foreground assets for proper icon rendering on Android devices.App Metadata:
strings.xmlfor display in the launcher and elsewhere.Configuration Updates:
libs.versions.toml, ensuring the app only runs on newer devices.