From c3cb55e52093cdd65321152745698d2b2a0d2797 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 15 May 2020 06:15:50 +0000 Subject: [PATCH] move app_icon.png images from drawable-* to mipmap-* --- app/src/main/AndroidManifest.xml | 4 ++-- .../res/{drawable-hdpi => mipmap-hdpi}/app_icon.png | Bin .../res/{drawable-ldpi => mipmap-ldpi}/app_icon.png | Bin .../res/{drawable-mdpi => mipmap-mdpi}/app_icon.png | Bin .../{drawable-tvdpi => mipmap-tvdpi}/app_icon.png | Bin .../{drawable-xhdpi => mipmap-xhdpi}/app_icon.png | Bin .../{drawable-xxhdpi => mipmap-xxhdpi}/app_icon.png | Bin .../app_icon.png | Bin tools/populate-app-icon | 5 +++-- 9 files changed, 5 insertions(+), 4 deletions(-) rename app/src/main/res/{drawable-hdpi => mipmap-hdpi}/app_icon.png (100%) rename app/src/main/res/{drawable-ldpi => mipmap-ldpi}/app_icon.png (100%) rename app/src/main/res/{drawable-mdpi => mipmap-mdpi}/app_icon.png (100%) rename app/src/main/res/{drawable-tvdpi => mipmap-tvdpi}/app_icon.png (100%) rename app/src/main/res/{drawable-xhdpi => mipmap-xhdpi}/app_icon.png (100%) rename app/src/main/res/{drawable-xxhdpi => mipmap-xxhdpi}/app_icon.png (100%) rename app/src/main/res/{drawable-xxxhdpi => mipmap-xxxhdpi}/app_icon.png (100%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 33d9c8a8..8cb9a749 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,9 +24,9 @@ android:name=".App" android:allowBackup="true" android:fullBackupContent="@xml/backup_descriptor" - android:icon="@drawable/app_icon" + android:icon="@mipmap/app_icon" android:label="@string/app_name" - android:roundIcon="@drawable/app_icon" + android:roundIcon="@mipmap/app_icon" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/AppTheme" diff --git a/app/src/main/res/drawable-hdpi/app_icon.png b/app/src/main/res/mipmap-hdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-hdpi/app_icon.png rename to app/src/main/res/mipmap-hdpi/app_icon.png diff --git a/app/src/main/res/drawable-ldpi/app_icon.png b/app/src/main/res/mipmap-ldpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-ldpi/app_icon.png rename to app/src/main/res/mipmap-ldpi/app_icon.png diff --git a/app/src/main/res/drawable-mdpi/app_icon.png b/app/src/main/res/mipmap-mdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-mdpi/app_icon.png rename to app/src/main/res/mipmap-mdpi/app_icon.png diff --git a/app/src/main/res/drawable-tvdpi/app_icon.png b/app/src/main/res/mipmap-tvdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-tvdpi/app_icon.png rename to app/src/main/res/mipmap-tvdpi/app_icon.png diff --git a/app/src/main/res/drawable-xhdpi/app_icon.png b/app/src/main/res/mipmap-xhdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/app_icon.png rename to app/src/main/res/mipmap-xhdpi/app_icon.png diff --git a/app/src/main/res/drawable-xxhdpi/app_icon.png b/app/src/main/res/mipmap-xxhdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/app_icon.png rename to app/src/main/res/mipmap-xxhdpi/app_icon.png diff --git a/app/src/main/res/drawable-xxxhdpi/app_icon.png b/app/src/main/res/mipmap-xxxhdpi/app_icon.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/app_icon.png rename to app/src/main/res/mipmap-xxxhdpi/app_icon.png diff --git a/tools/populate-app-icon b/tools/populate-app-icon index cd7ee6ef..d7840dd6 100755 --- a/tools/populate-app-icon +++ b/tools/populate-app-icon @@ -10,8 +10,9 @@ ICON_ART="$ART_DIR/app-icon.svg" gen_icons() { while read size name; do - mkdir -p "$RES_DIR/drawable-$name" - DST="$RES_DIR/drawable-$name/app_icon.png" + DST_DIR="$RES_DIR/mipmap-$name" + mkdir -p "$DST_DIR" + DST="$DST_DIR/app_icon.png" convert -background none "$ICON_ART" -scale ${size}x${size} \ -antialias -strip \ "$DST" -- 2.39.5