diff --git a/project.hxp b/project.hxp
index cebb7e280..481df3745 100644
--- a/project.hxp
+++ b/project.hxp
@@ -1199,14 +1199,33 @@ class Project extends HXProject
function configureIcons()
{
info('Configuring application icons...');
- if (!isIOS())
+
+ if (isAndroid())
{
- addIcon("art/icons/icon16.png", 16);
- addIcon("art/icons/icon32.png", 32);
- addIcon("art/icons/icon64.png", 64);
- addIcon("art/icons/iconOG.png");
+ // Adaptive icons
+ // TODO: Add Adapative Icons in Lime
+ templatePaths.push("templates");
+
+ var androidTheme:String = "@style/LimeAppMainTheme";
+ if (window.fullscreen != null && window.fullscreen)
+ {
+ androidTheme += "Fullscreen";
+ }
+
+ final iconXmlChild:Dynamic = {
+ "android:label": meta.title,
+ "android:allowBackup": "true",
+ "android:theme": androidTheme,
+ "android:hardwareAccelerated": "true",
+ "android:allowNativeHeapPointerTagging": ANDROID_TARGET_SDK_VERSION >= 30 ? "false" : null,
+ "android:largeHeap": "true",
+ "android:icon": "@mipmap/ic_launcher",
+ "android:roundIcon": "@mipmap/ic_launcher_round"
+ };
+
+ config.set('android.application', iconXmlChild);
}
- else
+ else if (isIOS())
{
// Note: the icons on iOS (and likely even android too) support nice P3 colors space
// However, lime's IconHelper.hx` and the general accompyaning encoding stuff to automatically
@@ -1229,7 +1248,15 @@ class Project extends HXProject
addIcon("art/icons/bf-iOS-Default-1024x1024.png", 1024);
addIcon("art/icons/bf-iOS-Default-1024x1024.png");
}
- info('Done configuring icons.');
+ else
+ {
+ addIcon("art/icons/icon16.png", 16);
+ addIcon("art/icons/icon32.png", 32);
+ addIcon("art/icons/icon64.png", 64);
+ addIcon("art/icons/iconOG.png");
+
+ info('Done configuring icons.');
+ }
}
/**
diff --git a/templates/android/template/app/src/main/res/drawable/ic_launcher_background.xml b/templates/android/template/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 000000000..07d5da9cb
--- /dev/null
+++ b/templates/android/template/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/android/template/app/src/main/res/drawable/ic_launcher_foreground.xml b/templates/android/template/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 000000000..2b068d114
--- /dev/null
+++ b/templates/android/template/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 000000000..036d09bc5
--- /dev/null
+++ b/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 000000000..036d09bc5
--- /dev/null
+++ b/templates/android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher.png b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..548e1f239
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..46d9cfb36
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 000000000..2486946b3
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher.png b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..c9a4c6bc0
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..5ac1d12f6
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 000000000..610e28840
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..ee4956ace
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..d5ddb2643
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..1e13a4061
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..c38b4a3e4
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..69a39479a
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..b2f1a7e4c
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..a5f4b953c
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..fa8c7e19b
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..7ec4a289e
Binary files /dev/null and b/templates/android/template/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/templates/android/template/app/src/main/res/values/colors.xml b/templates/android/template/app/src/main/res/values/colors.xml
new file mode 100644
index 000000000..f8c6127d3
--- /dev/null
+++ b/templates/android/template/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/templates/android/template/app/src/main/res/values/ic_launcher_background.xml b/templates/android/template/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 000000000..8f19d93a8
--- /dev/null
+++ b/templates/android/template/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FDF150
+
\ No newline at end of file