Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add anydpi icon, plus simplified splash screens. #89

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<item android:drawable="@color/colorSplashScreenBackground"/>
<item
android:gravity="center"
android:drawable="@drawable/splash_image_box" />
android:drawable="@mipmap/splash" />
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/colorSplashScreenBackground"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/colorSplashScreenBackground"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 10 additions & 55 deletions {{ cookiecutter.format }}/briefcase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,14 @@ icon.square.96 = "app/src/main/res/mipmap-xhdpi/ic_launcher.png"
icon.square.144 = "app/src/main/res/mipmap-xxhdpi/ic_launcher.png"
icon.square.192 = "app/src/main/res/mipmap-xxxhdpi/ic_launcher.png"

# Square splash screen images
#
# At app launch, we try to fill the screen's width with a square image, along
# with a background color of `splash_background_color`. There will be some
# padding above/below the image when the phone is in portrait mode (or to the
# left/right of the image when the phone is in landscape mode). When the app
# starts, we remove the splash image.
#
# We use the "normal" series of images on devices whose smallest dimension
# ("width") is less than 480 density-independent pixels, typically 320.
# Denisty-independent pixels are a way to measure physical size of the screen,
# e.g., a 5" phone. We use the "large" series of images for devices with at
# least 480 density-independent pixels of width, but smaller than xlarge. We use
# the "xlarge" series of images for devices at least 720 density-independent
# pixels of width.
#
# Normal corresponds to a typical phone. Large corresponds to a large phone, or
# phone-tablet hybrid (phablet). Xlarge corresponds to a large tablet.
#
# In addition to the normal/large/xlarge physical size distinction, we need to
# choose images appropriate for the device's current DPI. Android defines a
# variety of screen DPI buckets; we use mdpi (1x), hdpi (1.5x), xhdpi (2x),
# xxhdpi (3x), and xxxhdpi (4x). The device will choose the best image to use
# based on its actual DPI.
#
# The simplest way to create these images is to create the largest one at
# 2880x2880, then scale down. Create images whose width and height are the
# number in the splash image name (e.g., 320x320 for splash.normal.320).
#
# See also:
#
# For definitions of device sizes:
# https://developer.android.com/guide/topics/large-screens/support-different-screen-sizes#TaskUseSizeQuali
#
# For examples of specific devices and their sizes & DPI:
# https://material.io/blog/device-metrics
#
# For the relative frequency of normal vs. large vs. xlarge in real-world
# devices: https://developer.android.com/about/dashboards/index.html
splash.normal.320 = "app/src/main/res/drawable/launch.png"
splash.normal.480 = "app/src/main/res/drawable-hdpi/launch.png"
splash.normal.640 = "app/src/main/res/drawable-xhdpi/launch.png"
splash.normal.960 = "app/src/main/res/drawable-xxhdpi/launch.png"
splash.normal.1280 = "app/src/main/res/drawable-xxxhdpi/launch.png"
icon.square.320 = "app/src/main/res/mipmap-mdpi/splash.png"
icon.square.480 = "app/src/main/res/mipmap-hdpi/splash.png"
icon.square.640 = "app/src/main/res/mipmap-xhdpi/splash.png"
icon.square.960 = "app/src/main/res/mipmap-xxhdpi/splash.png"
icon.square.1280 = "app/src/main/res/mipmap-xxxhdpi/splash.png"

splash.large.480 = "app/src/main/res/drawable-sw480dp/launch.png"
splash.large.720 = "app/src/main/res/drawable-sw480dp-hdpi/launch.png"
splash.large.960 = "app/src/main/res/drawable-sw480dp-xhdpi/launch.png"
splash.large.1440 = "app/src/main/res/drawable-sw480dp-xxhdpi/launch.png"
splash.large.1920 = "app/src/main/res/drawable-sw480dp-xxxhdpi/launch.png"

splash.xlarge.720 = "app/src/main/res/drawable-sw720dp/launch.png"
splash.xlarge.1080 = "app/src/main/res/drawable-sw720dp-hdpi/launch.png"
splash.xlarge.1440 = "app/src/main/res/drawable-sw720dp-xhdpi/launch.png"
splash.xlarge.2160 = "app/src/main/res/drawable-sw720dp-xxhdpi/launch.png"
splash.xlarge.2880 = "app/src/main/res/drawable-sw720dp-xxxhdpi/launch.png"
icon.adaptive.108 = "app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png"
icon.adaptive.162 = "app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png"
icon.adaptive.216 = "app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png"
icon.adaptive.324 = "app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png"
icon.adaptive.432 = "app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png"
Loading