简体   繁体   中英

How to fit presplash screen to the aspect ratio of the device?

I am a python beginner trying to do a calculator. I need a little help. When I run the application I packaged with Buildozer, the pre-splash screen will not match the screen size of the device.(on photo) I know I have to do this in the buildozer.spec file. How can I do that? 在此处输入图像描述

In the buildozer specifications you can only set the filename of the splash image.

But your image should 512 x 512px to fit on all orientations and devices.

Take a look at the buildozer documentation:

https://buildozer.readthedocs.io/en/latest/specifications.html

If you develop for android you can set the presplash background color with android.presplash_color.

# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
android.presplash_color = #FFFFFF

For example if you use a nice transparent splash image with a 1:1 aspect ratio and set your nice blue color background it will work on a lot of devices and orinetations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM