Browse Source

Add adaptive icon

Closes #1057

* Use the recommended mipmap directory instead of drawable
* Remove outdated mkicons.sh script
* Add legacy icons for all densities
* Add monochrome version for Android 13+
* Deduplicate icon in fastlane folder
master
mueller-ma 2 years ago
parent
commit
56d82409da

+ 1
- 1
android/AndroidManifest.xml View File

@@ -9,7 +9,7 @@

<application
android:name="com.reecedunn.espeak.EspeakApp"
android:icon="@drawable/icon"
android:icon="@mipmap/icon"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
<service

+ 0
- 10
android/mkicons.sh View File

@@ -1,10 +0,0 @@
#!/bin/bash

RSVG=${RSVG:=rsvg-convert}

${RSVG} -w 24 -h 24 icons/launcher.svg > res/drawable-ldpi/icon.png
${RSVG} -w 32 -h 32 icons/launcher.svg > res/drawable-mdpi/icon.png
${RSVG} -w 48 -h 48 icons/launcher.svg > res/drawable-hdpi/icon.png
${RSVG} -w 64 -h 64 icons/launcher.svg > res/drawable-xhdpi/icon.png

${RSVG} -w 180 -h 120 icons/promo-graphic.svg > icons/promo-graphic.png

BIN
android/res/drawable-hdpi/icon.png View File


BIN
android/res/drawable-ldpi/icon.png View File


BIN
android/res/drawable-mdpi/icon.png View File


BIN
android/res/drawable-xhdpi/icon.png View File


+ 32
- 0
android/res/drawable/icon_foreground.xml View File

@@ -0,0 +1,32 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="256"
android:viewportHeight="256">
<group android:scaleX="0.49"
android:scaleY="0.49"
android:translateX="65.28"
android:translateY="65.28">
<path
android:pathData="m111,170c-6,-3 -16,-12 -32,-33C56,107 47,100 36,97 34,97 33,97 33,96c0,0 5,-5 11,-11 6,-6 18,-19 27,-29 18,-21 35,-40 36,-40 0,0 2,3 4,6 5,9 10,15 15,15 7,0 16,-10 24,-26l3,-7 4,6c13,19 33,43 52,62l15,15 -5,1c-7,2 -13,5 -21,12 -6,5 -13,12 -38,40 -17,20 -32,31 -40,31 -2,0 -5,-1 -7,-2zM135,121c7,-3 17,-13 25,-25 6,-9 12,-20 12,-21 0,0 -1,-1 -2,-1 -1,0 -7,-2 -13,-5 -12,-6 -20,-8 -26,-8C127,62 116,68 102,77 97,81 91,85 90,85c-2,0 -3,1 -3,1 0,1 7,12 10,17 13,18 25,24 38,17z"
android:fillColor="#d40000"/>
<path
android:pathData="m34.39,194.42q7.23,0 11.46,4.16 4.22,4.1 4.22,11.71v4.61L27.54,214.9q0.13,4.03 2.37,6.34 2.3,2.3 6.34,2.3 3.33,0 6.08,-0.64 2.82,-0.7 5.76,-2.11v7.36q-2.62,1.28 -5.44,1.86 -2.82,0.64 -6.85,0.64 -5.25,0 -9.28,-1.92 -4.03,-1.98 -6.34,-5.89 -2.3,-3.97 -2.3,-10.05 0,-6.08 2.05,-10.18 2.11,-4.1 5.82,-6.14 3.71,-2.05 8.64,-2.05zM34.46,201.2q-2.82,0 -4.61,1.79 -1.79,1.79 -2.11,5.57h13.38q-0.06,-3.14 -1.73,-5.25 -1.6,-2.11 -4.93,-2.11z"
android:fillColor="#ffffff"/>
<path
android:pathData="m85.53,217.33q0,6.08 -4.42,9.73 -4.35,3.58 -12.42,3.58 -7.23,0 -12.93,-2.75v-9.02q3.26,1.41 6.72,2.62 3.52,1.15 6.98,1.15 3.58,0 5.06,-1.34 1.54,-1.41 1.54,-3.52 0,-1.73 -1.22,-2.94 -1.15,-1.22 -3.14,-2.24 -1.98,-1.09 -4.54,-2.3 -1.6,-0.77 -3.46,-1.79 -1.86,-1.09 -3.58,-2.62 -1.66,-1.6 -2.75,-3.84 -1.09,-2.24 -1.09,-5.38 0,-6.14 4.16,-9.54 4.16,-3.46 11.33,-3.46 3.58,0 6.78,0.83 3.2,0.83 6.78,2.37l-3.14,7.55q-3.14,-1.28 -5.63,-1.98 -2.5,-0.7 -5.12,-0.7 -2.75,0 -4.22,1.28 -1.47,1.28 -1.47,3.33 0,2.43 2.18,3.84 2.18,1.41 6.46,3.46 3.52,1.66 5.95,3.46 2.5,1.79 3.84,4.22 1.34,2.43 1.34,6.02z"
android:fillColor="#ffffff"/>
<path
android:pathData="m112.54,194.42q5.89,0 9.54,4.61 3.65,4.54 3.65,13.44 0,8.96 -3.78,13.57 -3.78,4.61 -9.66,4.61 -3.78,0 -6.02,-1.34 -2.24,-1.41 -3.65,-3.14h-0.51q0.51,2.69 0.51,5.12v14.08h-9.54v-50.3h7.74l1.34,4.54h0.45q1.41,-2.11 3.78,-3.65 2.37,-1.54 6.14,-1.54zM109.46,202.03q-3.71,0 -5.25,2.37 -1.54,2.3 -1.6,6.98v1.02q0,5.06 1.47,7.81 1.54,2.69 5.5,2.69 3.26,0 4.8,-2.69 1.6,-2.75 1.6,-7.87 0,-10.3 -6.53,-10.3z"
android:fillColor="#ffffff"/>
<path
android:pathData="m147.99,194.42q7.23,0 11.46,4.16 4.22,4.1 4.22,11.71v4.61h-22.53q0.13,4.03 2.37,6.34 2.3,2.3 6.34,2.3 3.33,0 6.08,-0.64 2.82,-0.7 5.76,-2.11v7.36q-2.62,1.28 -5.44,1.86 -2.82,0.64 -6.85,0.64 -5.25,0 -9.28,-1.92 -4.03,-1.98 -6.34,-5.89 -2.3,-3.97 -2.3,-10.05 0,-6.08 2.05,-10.18 2.11,-4.1 5.82,-6.14 3.71,-2.05 8.64,-2.05zM148.06,201.2q-2.82,0 -4.61,1.79 -1.79,1.79 -2.11,5.57h13.38q-0.06,-3.14 -1.73,-5.25 -1.6,-2.11 -4.93,-2.11z"
android:fillColor="#ffffff"/>
<path
android:pathData="m185.75,194.35q7.04,0 10.75,3.07 3.78,3.01 3.78,9.28L200.28,230h-6.66l-1.86,-4.74h-0.26q-2.24,2.82 -4.74,4.1 -2.5,1.28 -6.85,1.28 -4.67,0 -7.74,-2.69 -3.07,-2.69 -3.07,-8.38 0,-5.57 3.9,-8.19 3.9,-2.62 11.71,-2.94l6.08,-0.19v-1.54q0,-2.75 -1.47,-4.03 -1.41,-1.28 -3.97,-1.28 -2.56,0 -4.99,0.77 -2.43,0.7 -4.86,1.79l-3.14,-6.46q2.75,-1.41 6.21,-2.24 3.46,-0.9 7.17,-0.9zM190.81,213.81 L187.1,213.94q-4.61,0.13 -6.4,1.66 -1.79,1.54 -1.79,4.03 0,2.18 1.28,3.14 1.28,0.9 3.33,0.9 3.07,0 5.18,-1.79 2.11,-1.86 2.11,-5.18z"
android:fillColor="#ffffff"/>
<path
android:pathData="m219.61,181.36v21.76q0,1.98 -0.19,3.97 -0.13,1.92 -0.32,3.9h0.13q0.96,-1.34 1.98,-2.69 1.02,-1.34 2.18,-2.62l9.79,-10.62h10.75l-13.89,15.17 14.72,19.78h-11.01l-10.05,-14.14 -4.1,3.26V230h-9.54v-48.64z"
android:fillColor="#ffffff"/>
</group>
</vector>

+ 6
- 0
android/res/mipmap-anydpi-v26/icon.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_background"/>
<foreground android:drawable="@drawable/icon_foreground"/>
<monochrome android:drawable="@drawable/icon_foreground"/>
</adaptive-icon>

BIN
android/res/mipmap-hdpi/icon.png View File


BIN
android/res/mipmap-mdpi/icon.png View File


BIN
android/res/mipmap-xhdpi/icon.png View File


BIN
android/res/mipmap-xxhdpi/icon.png View File


BIN
android/res/mipmap-xxxhdpi/icon.png View File


+ 4
- 0
android/res/values/icon_background.xml View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="icon_background">#232323</color>
</resources>

BIN
fastlane/metadata/android/en-US/images/icon.png View File


BIN
fastlane/metadata/android/es-ES/images/icon.png View File


Loading…
Cancel
Save