]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Add an adaptive launcher icon
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Jun 2018 12:02:22 +0000 (14:02 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 3 Jul 2018 09:31:36 +0000 (11:31 +0200)
Using <inset> in a mipmap folder apparently is not fully valid, at least
Android Studio complains about it (it seems to work fine, though).

src/frontends/android/app/src/main/AndroidManifest.xml
src/frontends/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml [new file with mode: 0644]
src/frontends/android/app/src/main/res/mipmap-anydpi/ic_launcher.xml [new file with mode: 0644]
src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_bg.png [new file with mode: 0644]
src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_fg.png [new file with mode: 0644]

index 6b0db3782b83fe95628d0ef6116e1295cb616ab0..ab3725b56e09fa0d9d312dd4b99107af2b73f1b6 100644 (file)
@@ -24,7 +24,7 @@
 
     <application
         android:name=".logic.StrongSwanApplication"
-        android:icon="@drawable/ic_launcher"
+        android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:theme="@style/ApplicationTheme"
         android:allowBackup="false" >
diff --git a/src/frontends/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/frontends/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644 (file)
index 0000000..c389ee9
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2018 Tobias Brunner
+    HSR Hochschule fuer Technik Rapperswil
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+
+    This program is distributed in the hope that it will be useful, but
+    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+    <background android:drawable="@mipmap/ic_launcher_bg" />
+    <foreground android:drawable="@mipmap/ic_launcher_fg" />
+</adaptive-icon>
diff --git a/src/frontends/android/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/src/frontends/android/app/src/main/res/mipmap-anydpi/ic_launcher.xml
new file mode 100644 (file)
index 0000000..653d080
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (C) 2018 Tobias Brunner
+    HSR Hochschule fuer Technik Rapperswil
+
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2 of the License, or (at your
+    option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+
+    This program is distributed in the hope that it will be useful, but
+    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+    for more details.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:drawable="@drawable/ic_launcher" />
\ No newline at end of file
diff --git a/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_bg.png b/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_bg.png
new file mode 100644 (file)
index 0000000..df827ee
Binary files /dev/null and b/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_bg.png differ
diff --git a/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_fg.png b/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_fg.png
new file mode 100644 (file)
index 0000000..3d0c9bf
Binary files /dev/null and b/src/frontends/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_fg.png differ