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/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index 2d4ea44eab4febb6992857ed307ce783d55be2c8..c7b68e548d8ae201c1444625224a78f5217643d5 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ 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..c7b68e548d8ae201c1444625224a78f5217643d5 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/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 067641ecffa2162148b350937f5c5be98e2c0851..d70083dd2ea3bb8d357bb93c2b20b6cefecc815a 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.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..d70083dd2ea3bb8d357bb93c2b20b6cefecc815a 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/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 534a8c4304e621b9ef60cee2f3e0e1f67e56174a..a7bd1f3d78d9d6adcd0a56a2ef5f429429f5ece7 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.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..a7bd1f3d78d9d6adcd0a56a2ef5f429429f5ece7 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/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 64a37c85359795567bb42b05e1e071e61e2c5fcd..fdee02c1b88707bc05554c0e6194e1cc0d95b98d 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.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..fdee02c1b88707bc05554c0e6194e1cc0d95b98d 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/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 20f13b46a5bdbc19ac735249aa0790402548970f..4cf19bc361587d7c16ac5eecd49b82180eb286cf 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.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..4cf19bc361587d7c16ac5eecd49b82180eb286cf 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 65eed6426393974efb5a056ec44936d42b5ef2a1..4bb5439f682100f8ef4ba80a557fe4f2f0ab14c2 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.8 -app.versionCode=8 +app.versionName=0.0.9 +app.versionCode=9 diff --git a/fastlane/metadata/android/en-US/changelogs/9.txt b/fastlane/metadata/android/en-US/changelogs/9.txt new file mode 100644 index 0000000000000000000000000000000000000000..484bf5c4031946fe4ecd84b007c03592c64a33ab --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/9.txt @@ -0,0 +1 @@ +Enable launch screen with image diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png new file mode 100644 index 0000000000000000000000000000000000000000..d94cd4c48e61c0b2a131b828585ef141878cbe03 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/featureGraphic.png differ diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index 2556c0ba371a81030d9109b24db8d86639403368..ab2f9ea22633fc804f09e995bf5a661ddc24f507 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/fr-FR/changelogs/9.txt b/fastlane/metadata/android/fr-FR/changelogs/9.txt new file mode 100644 index 0000000000000000000000000000000000000000..57ab64681f606443e40e7fce941bf9d4788d5a54 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/9.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 92aadaee7f4c2e53737e15c2c2a5e6dfad60c37d..27dbe2647fe4e6d562fbd99451716d1b7d448570 100755 --- a/icons/build_application_icons.sh +++ b/icons/build_application_icons.sh @@ -8,40 +8,111 @@ 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_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 +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() { - SOURCE="$1" + SVG="$1" - cp ${SOURCE} ${SOURCE}.tmp + cp ${SVG} ${SVG}.tmp scour \ --remove-descriptive-elements \ --enable-id-stripping \ --enable-viewboxing \ --enable-comment-stripping \ --nindent=4 \ - -i ${SOURCE}.tmp \ - -o ${SOURCE} - rm ${SOURCE}.tmp + --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_asset_image() { - ICON_SIZE=192 - SOURCE="$1" +function build_application_icon() { + ICON_SIZE="$1" TARGET="$2" - optimize_svg "${SOURCE}" + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" inkscape \ --export-width=${ICON_SIZE} \ --export-height=${ICON_SIZE} \ - --export-filename=${TARGET} \ - ${SOURCE} + --export-filename=${TARGET_PNG} \ + ${SOURCE_ICON} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +# build fastlane image +function build_fastlane_image() { + WIDTH="$1" + HEIGHT="$2" + TARGET="$3" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${WIDTH} \ + --export-height=${HEIGHT} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_FASTLANE} - optipng ${OPTIPNG_OPTIONS} ${TARGET} + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -# Icons -build_asset_image ${CURRENT_DIR}/icon.svg ${BASE_DIR}/assets/icons/application.png +# 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 diff --git a/icons/featureGraphic.svg b/icons/featureGraphic.svg new file mode 100644 index 0000000000000000000000000000000000000000..2033f317c082bce27115e88ca068d358b08318d0 --- /dev/null +++ b/icons/featureGraphic.svg @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 1024 500" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="1024" height="500" rx="0" ry="0" fill="#977cff"/></svg>