Skip to content

Commit

Permalink
Added Android adaptive icons
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Mar 23, 2021
1 parent 00909ca commit c027320
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 9 deletions.
22 changes: 15 additions & 7 deletions src/app/install.pri
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,22 @@ android {
QT += androidextras
OTHER_FILES += \
platform/android/AndroidManifest.xml \
platform/android/res/drawable/banner.png \
platform/android/res/drawable-ldpi/icon.png \
platform/android/res/drawable-mdpi/icon.png \
platform/android/res/drawable-hdpi/icon.png \
platform/android/res/drawable-xhdpi/icon.png \
platform/android/res/drawable-xxhdpi/icon.png \
platform/android/res/drawable-xxxhdpi/icon.png \
platform/android/res/mipmap/banner.png \
platform/android/res/mipmap-ldpi/icon.png \
platform/android/res/mipmap-mdpi/icon.png \
platform/android/res/mipmap-hdpi/icon.png \
platform/android/res/mipmap-xhdpi/icon.png \
platform/android/res/mipmap-xxhdpi/icon.png \
platform/android/res/mipmap-xxxhdpi/icon.png \
platform/android/res/mipmap-ldpi/icon_fg.png \
platform/android/res/mipmap-mdpi/icon_fg.png \
platform/android/res/mipmap-hdpi/icon_fg.png \
platform/android/res/mipmap-xhdpi/icon_fg.png \
platform/android/res/mipmap-xxhdpi/icon_fg.png \
platform/android/res/mipmap-xxxhdpi/icon_fg.png \
platform/android/res/mipmap-anydpi-v26/icon.xml \
platform/android/src/org/pegasus_frontend/android/MainActivity.java \
platform/android/res/values/icon_bg.xml \
platform/android/res/values/libs.xml \

ANDROID_MIN_SDK_VERSION = 21
Expand Down
4 changes: 2 additions & 2 deletions src/app/platform/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
android:hardwareAccelerated="true"
android:name="org.qtproject.qt5.android.bindings.QtApplication"
android:label="Pegasus"
android:icon="@drawable/icon"
android:banner="@drawable/banner"
android:icon="@mipmap/icon"
android:banner="@mipmap/banner"
android:extractNativeLibs="true"
android:requestLegacyExternalStorage="true">
<activity
Expand Down
5 changes: 5 additions & 0 deletions src/app/platform/android/res/mipmap-anydpi-v26/icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_bg"/>
<foreground android:drawable="@mipmap/icon_fg"/>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/app/platform/android/res/values/icon_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="icon_bg">#333333</color>
</resources>

0 comments on commit c027320

Please sign in to comment.