diff options
| -rw-r--r-- | packages/meshbay-android/README.md | 25 | ||||
| -rw-r--r-- | packages/meshbay-android/app/src/main/AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 7 | ||||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml | 7 | ||||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png | bin | 0 -> 17157 bytes | |||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png | bin | 0 -> 8754 bytes | |||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png | bin | 0 -> 28251 bytes | |||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png | bin | 0 -> 55758 bytes | |||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png | bin | 0 -> 87228 bytes | |||
| -rw-r--r-- | packages/meshbay-android/app/src/main/res/values/colors.xml | 5 |
10 files changed, 46 insertions, 0 deletions
diff --git a/packages/meshbay-android/README.md b/packages/meshbay-android/README.md index 68f6dad..85e2406 100644 --- a/packages/meshbay-android/README.md +++ b/packages/meshbay-android/README.md @@ -37,3 +37,28 @@ source: `packages/meshbay-hub/tests/test_android_shell.py`. Not built yet: phone-specific behaviour (back button, network handover, keeping a download alive with the screen off), signed releases. + +## Icon + +The desktop client's icon, `meshbay-client/build/icon-square.png`, placed in +the adaptive icon's safe zone (72 dp of the 108 dp layer, which is what every +launcher mask leaves visible) over its own edge colour, so no mask crops the +M. The five `mipmap-*/ic_launcher_foreground.png` are generated from it: + +```python +from PIL import Image, ImageDraw, ImageFilter +src = Image.open("../meshbay-client/build/icon-square.png").convert("RGBA") +for name, L in [("mdpi", 108), ("hdpi", 162), ("xhdpi", 216), ("xxhdpi", 324), ("xxxhdpi", 432)]: + S = L * 72 // 108; b = max(2, S // 25) + img = src.resize((S, S), Image.LANCZOS) + mask = Image.new("L", (S, S), 0) + ImageDraw.Draw(mask).rectangle([b, b, S - b - 1, S - b - 1], fill=255) + img.putalpha(mask.filter(ImageFilter.GaussianBlur(b))) + layer = Image.new("RGBA", (L, L), (0, 0, 0, 0)) + layer.paste(img, ((L - S) // 2, (L - S) // 2), img) + layer.save(f"app/src/main/res/mipmap-{name}/ic_launcher_foreground.png", optimize=True) +``` + +No monochrome layer: a themed icon keeps only the layer's alpha, and this one +would be a filled square. + diff --git a/packages/meshbay-android/app/src/main/AndroidManifest.xml b/packages/meshbay-android/app/src/main/AndroidManifest.xml index d6f83ee..2eae3ea 100644 --- a/packages/meshbay-android/app/src/main/AndroidManifest.xml +++ b/packages/meshbay-android/app/src/main/AndroidManifest.xml @@ -14,6 +14,8 @@ fails to open on the next device. --> <application android:label="MeshBay" + android:icon="@mipmap/ic_launcher" + android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:fullBackupContent="false" android:dataExtractionRules="@xml/data_extraction_rules" diff --git a/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..50c1c99 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- The desktop client's icon (meshbay-client/build/icon-square.png), placed + in the adaptive icon's safe zone so no launcher mask crops the M. --> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background" /> + <foreground android:drawable="@mipmap/ic_launcher_foreground" /> +</adaptive-icon> diff --git a/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..50c1c99 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- The desktop client's icon (meshbay-client/build/icon-square.png), placed + in the adaptive icon's safe zone so no launcher mask crops the M. --> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background" /> + <foreground android:drawable="@mipmap/ic_launcher_foreground" /> +</adaptive-icon> diff --git a/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..5b29801 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..4e211fb --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..d86c80b --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..2fdac24 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png Binary files differnew file mode 100644 index 0000000..6cc1a12 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/packages/meshbay-android/app/src/main/res/values/colors.xml b/packages/meshbay-android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..515e694 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- The edge of icon-square.png, so the safe-zone image meets a seamless field. --> + <color name="ic_launcher_background">#010822</color> +</resources> |