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..927d19d60ebc3d0093b6844e83ba37bf2ed1f6d4 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..c2725b914ef1c099602d00d8e0c85fe4311b60a6 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..59a7beaf752d18ecfcb4a4e38021513355bb5c16 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..d5515ab3b04e1fff2275ffffcd30f5a586864035 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..68ed8339caa6a0a7350d71ef21217ad8d58e4454 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 9afb4c689a0bff258d2a5403ef6a41e03d7faed5..007b41f87df662638a73e32c7ad937e5b08460a6 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.48 -app.versionCode=48 +app.versionName=0.0.49 +app.versionCode=49 diff --git a/fastlane/metadata/android/en-US/changelogs/49.txt b/fastlane/metadata/android/en-US/changelogs/49.txt new file mode 100644 index 0000000000000000000000000000000000000000..484bf5c4031946fe4ecd84b007c03592c64a33ab --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/49.txt @@ -0,0 +1 @@ +Enable launch screen with image diff --git a/fastlane/metadata/android/fr-FR/changelogs/49.txt b/fastlane/metadata/android/fr-FR/changelogs/49.txt new file mode 100644 index 0000000000000000000000000000000000000000..57ab64681f606443e40e7fce941bf9d4788d5a54 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/49.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 7d5ebb61276b80b4034edfc0f4703c7e60c4f5fe..27dbe2647fe4e6d562fbd99451716d1b7d448570 100755 --- a/icons/build_application_icons.sh +++ b/icons/build_application_icons.sh @@ -8,34 +8,47 @@ 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" -if [ ! -f "${SOURCE}" ]; then - echo "Missing file: ${SOURCE}" +if [ ! -f "${SOURCE_ICON}" ]; then + echo "Missing file: ${SOURCE_ICON}" fi if [ ! -f "${SOURCE_FASTLANE}" ]; then echo "Missing file: ${SOURCE_FASTLANE}" fi -# optimize svg -cp ${SOURCE} ${SOURCE}.tmp -scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i ${SOURCE}.tmp \ - -o ${SOURCE} -rm ${SOURCE}.tmp +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" @@ -47,7 +60,7 @@ function build_icon() { --export-width=${ICON_SIZE} \ --export-height=${ICON_SIZE} \ --export-filename=${TARGET_PNG} \ - ${SOURCE} + ${SOURCE_ICON} optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } @@ -60,18 +73,6 @@ function build_fastlane_image() { echo "Building ${TARGET}" - cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp - scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i ${SOURCE_FASTLANE}.tmp \ - -o ${SOURCE_FASTLANE} - rm ${SOURCE_FASTLANE}.tmp - TARGET_PNG="${TARGET}.png" inkscape \ @@ -83,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