Closed paulproteus closed 4 years ago
All sounds good, except I'm unsure I agree with you about the default splash screen being the "Made with BeeWare" image. I'd rather it just be the app icon on a white/some-color background. IMHO it's suboptimal for users of apps made with BeeWare to ever see the words BeeWare. Maybe we can discuss the aesthetics tonight on our call. :)
@freakboy3742 I need you to generate new images. I also spent a while writing a comment in briefcase.toml
which, if you like the text there, I'll copy that text to the briefcase docs.
Cheerio.
This adds a splash screen, which looks like this:
When the app finishes loading, it looks like this.
This, I believe, conforms to our conversation over the past few days. Happy to take feedback and revise as needed.
More details
The template now exposes these properties:
The
160dp
etc. are the image visual sizes the user will see. This is controlled by thesplash_image_box
layout. You'll see there are four copies ofsplash_image_box.xml
, each targeting a different range of screen sizes. The first one, the default,drawable/splash_image_box.xml
, has a comment that aims to explain this logic in more detail.The
mdpi
,hdpi
,xhdpi
, andxxxhdpi
are hopefully self-explanatory, along with this page: https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmpIf we like this, I intend to write docs for briefcase explaining how users should think about this.
Testing performed
My emulator is
xhdpi
(420 DPI specifically, for some reason). Its screen is 1080x1794, which scales down to 411dp (>>> 1080/(420/160) 411.42857142857144
). It therefore uses the defaultsplash_image_box.xml
, and what I see on the screen is that splash screen looks decently high-res (not ugly & scaled), and it takes about 1/3 of the screen, centered. That's consistent with not using the default PNG.I further tested by modifying
android/Hello World
so thatapp/src/main/res/drawable/launch.png
was a different image. I didbriefcase build android && briefcase run android
and I found it's still using the launcher image, i.e., it's successfully not using the default PNG, i.e., it's preferring the hdpi PNG.Happy to do other testing as desired.
I haven't tested with editing
pyproject.toml
yet. Maybe I can get you to try that, if you will be so kind?Images
I've done my best job to create sample images here, but you probably will want to replace them, and that is fine with me!!!
Size info (all images are squre)
160dp (for small phone) @ mdpi = 160px
240dp (for large phone) @ mdpi = 240px
300dp (for 7" tablet) @ mdpi = 300px
360dp (for 10" tablet) @ mdpi = 360px
160dp (for small phone) @ hdpi = 240px
240dp (for large phone) @ hdpi = 360px
300dp (for 7" tablet) @ hdpi = 450px
360dp (for 10" tablet) @ hdpi = 540px
160dp (for small phone) @ xhdpi = 320px
240dp (for large phone) @ xhdpi = 480px
300dp (for 7" tablet) @ xhdpi = 600px
360dp (for 10" tablet) @ xdpi = 720px
160dp (for small phone) @ xxxhdpi = 640px
240dp (for large phone) @ xxxhdpi = 960px
300dp (for 7" tablet) @ xxxhdpi = 1200px
360dp (for 10" tablet) @ xxxhdpi = 1440px