diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index f74085f3f6a2b995f8ad1f9ff7b2c46dc118a9e0..428eb361622fc80a398549107f435d3608d8cbe8 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,12 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="?android:colorBackground" /> - <!-- You can insert your own image assets here --> - <!-- <item> + <item> <bitmap android:gravity="center" android:src="@mipmap/launch_image" /> - </item> --> + </item> </layer-list> diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index 304732f8842013497e14bd02f67a55f2614fb8f7..e4551e90d03b1a7d9ca652bc2054d62b479cc84f 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,12 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@android:color/white" /> - <!-- You can insert your own image assets here --> - <!-- <item> + <item> <bitmap android:gravity="center" android:src="@mipmap/launch_image" /> - </item> --> + </item> </layer-list> diff --git a/android/app/src/main/res/mipmap-hdpi/launch_image.png b/android/app/src/main/res/mipmap-hdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..a4c2c5636ebdde4ddd6394b729458e9846a4cdba Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launch_image.png b/android/app/src/main/res/mipmap-mdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..4fbf9f458dea0f5c6e843a9af16f77b0b3aeecd5 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launch_image.png b/android/app/src/main/res/mipmap-xhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..73cce8dac2017aea302fb0fd96f3bd4caaa804c6 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launch_image.png b/android/app/src/main/res/mipmap-xxhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..b7b6dd9fe7a32d30f37408993702851ee7c15142 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png b/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..7cb45487df2a140b21dda89ede1a0d81685e3c3f Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f930826851b495d039f0c0d57f247536615..c6e7031f33f4c950119a059603cf058d16983dd3 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -1,17 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> - <!-- Show a splash screen on the activity. Automatically removed when - Flutter draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> - <!-- Theme applied to the Android Window as soon as the process has started. - This theme determines the color of the Android Window while your - Flutter UI initializes, as well as behind your Flutter UI while its - running. - - This Theme is only used starting with V2 of Flutter's Android embedding. --> <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> <item name="android:windowBackground">?android:colorBackground</item> </style> diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index d74aa35c28261a8e78264252be7f0f6f9406ec35..ff81bae863800e62cfd23ccf572c4ba607128496 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,17 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> - <!-- Show a splash screen on the activity. Automatically removed when - Flutter draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> - <!-- Theme applied to the Android Window as soon as the process has started. - This theme determines the color of the Android Window while your - Flutter UI initializes, as well as behind your Flutter UI while its - running. - - This Theme is only used starting with V2 of Flutter's Android embedding. --> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <item name="android:windowBackground">?android:colorBackground</item> </style> diff --git a/android/gradle.properties b/android/gradle.properties index 957c40bc42f3a742d2266dc3a403ad014458ba3f..777ac2de0980e935649cf32bd85097eaf789185a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.15 -app.versionCode=15 +app.versionName=0.0.16 +app.versionCode=16 diff --git a/fastlane/metadata/android/en-US/changelogs/16.txt b/fastlane/metadata/android/en-US/changelogs/16.txt new file mode 100644 index 0000000000000000000000000000000000000000..484bf5c4031946fe4ecd84b007c03592c64a33ab --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/16.txt @@ -0,0 +1 @@ +Enable launch screen with image diff --git a/fastlane/metadata/android/fr-FR/changelogs/16.txt b/fastlane/metadata/android/fr-FR/changelogs/16.txt new file mode 100644 index 0000000000000000000000000000000000000000..57ab64681f606443e40e7fce941bf9d4788d5a54 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/16.txt @@ -0,0 +1 @@ +Activation de l'écran de chargement avec image diff --git a/icons/build_application_icons.sh b/icons/build_application_icons.sh index fbf002fb2e48c1c8e2689cb1295b2028a139b08a..27dbe2647fe4e6d562fbd99451716d1b7d448570 100755 --- a/icons/build_application_icons.sh +++ b/icons/build_application_icons.sh @@ -8,33 +8,59 @@ command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "${CURRENT_DIR}")" -SOURCE="${CURRENT_DIR}/icon.svg" +SOURCE_ICON="${CURRENT_DIR}/icon.svg" +SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" +SOURCE_LAUNCH_IMAGE="${CURRENT_DIR}/icon.svg" + OPTIPNG_OPTIONS="-preserve -quiet -o7" -# optimize svg -cp ${SOURCE} ${SOURCE}.tmp -scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - -i ${SOURCE}.tmp \ - -o ${SOURCE} -rm ${SOURCE}.tmp +if [ ! -f "${SOURCE_ICON}" ]; then + echo "Missing file: ${SOURCE_ICON}" +fi + +if [ ! -f "${SOURCE_FASTLANE}" ]; then + echo "Missing file: ${SOURCE_FASTLANE}" +fi + +if [ ! -f "${SOURCE_LAUNCH_IMAGE}" ]; then + echo "Missing file: ${SOURCE_LAUNCH_IMAGE}" +fi + +function optimize_svg() { + SVG="$1" + + cp ${SVG} ${SVG}.tmp + scour \ + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SVG}.tmp \ + -o ${SVG} + rm ${SVG}.tmp +} + +# optimize source svg files +optimize_svg ${SOURCE_ICON} +optimize_svg ${SOURCE_FASTLANE} +optimize_svg ${SOURCE_LAUNCH_IMAGE} # build icons -function build_icon() { +function build_application_icon() { ICON_SIZE="$1" TARGET="$2" + echo "Building ${TARGET}" + TARGET_PNG="${TARGET}.png" inkscape \ --export-width=${ICON_SIZE} \ --export-height=${ICON_SIZE} \ --export-filename=${TARGET_PNG} \ - ${SOURCE} + ${SOURCE_ICON} optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } @@ -45,18 +71,7 @@ function build_fastlane_image() { HEIGHT="$2" TARGET="$3" - SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" - - cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp - scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - -i ${SOURCE_FASTLANE}.tmp \ - -o ${SOURCE_FASTLANE} - rm ${SOURCE_FASTLANE}.tmp + echo "Building ${TARGET}" TARGET_PNG="${TARGET}.png" @@ -69,11 +84,35 @@ function build_fastlane_image() { optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher -build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher -build_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher -build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher -build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher -build_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon +# build launch images (splash screen) +function build_launch_image() { + ICON_SIZE="$1" + TARGET="$2" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_LAUNCH_IMAGE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +build_application_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher +build_application_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher +build_application_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher +build_application_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher +build_application_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher +build_application_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon + +build_launch_image 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image +build_launch_image 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image +build_launch_image 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image +build_launch_image 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/launch_image +build_launch_image 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/launch_image build_fastlane_image 1024 500 ${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic