Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Android splash screen issue


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Jul 15, 2016 2:02 AM Last Post By: Markus Humm
Markus Humm

Posts: 5,113
Registered: 11/9/03
Android splash screen issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2016 2:43 AM
Hello,

I'm using Delphi 10.1 Berlin to build and Android app.
My app shall have a splash screen. I created 4 png files as 9-patch images
where horizontally only the 2nd to top left and the top right pixels is not black.
This should result in a vertically centered splash screen.

The bottom area of the png contains a logo.
I added all 4 images and they appear in deployment manager as well.
Setting for clamp/repeat mode is "disabled" and for gravity is "Bottom", "fill" or "center".
I tried all of those. Unfortunately access to Google's Android developer website is not
possible at the moment, it doesn't load.

In deployment manager "splash_image_def.xml" in "Android}Debug" is not checked,
I don't know why. I didn't do this and I also don't know if it needs to be checked.

Now when I test my app on the following four devices, the logo in the bottom part is only
centered on two of them, on the other two (LG L50 and Samsung Galaxy XCover, both are 480x800)
it's too far left. The preview in the Android SDK 9-patch creation tool looks good for all images.

My test devices are:
1. Google Nexus 4, Android 5.1, 720*1280 pixel, TDeviceInfo.TDeviceClass reports this as "tablet",
Phys. screen size:768x1184
Log. screen size:2x3
Raw screen size:1280x768
Aspect ratio:1.54166662693024
Pixel per inch:319
Screen scale:2

2. LG L50, Android 4.4, 480x800 pixel, TDeviceInfo.TDeviceClass reports this as "phone",
Phys. screen size:480x800
Log. screen size:2x3
Raw screen size:800x480
Aspect ratio:1.66666662693024
Pixel per inch:235
Screen scale:1.5

3. Samsung Galaxy S5, Android 5.0, 1080x1920 pixel, TDeviceInfo.TDeviceClass reports this as "phone",
Phys. screen size:1080x1920
Log. screen size:2x4
Raw screen size:1920x1080
Aspect ratio:1.77777779102325
Pixel per inch:423
Screen scale:3

4. Samsung Galaxy XCover 3, Android 4.4, 480x800 pixel, TDeviceInfo.TDeviceClass reports this as "phone",
Phys. screen size:480x800
Log. screen size:2x4
Raw screen size:800x480
Aspect ratio:1.66666662693024
Pixel per inch:190
Screen scale:1.5

Anybody any clue why this isn't working as I'd expect it?

Greetings

Markus
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Android splash screen issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2016 4:24 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Hello,

I'm using Delphi 10.1 Berlin to build and Android app.
My app shall have a splash screen. I created 4 png files as 9-patch images
where horizontally only the 2nd to top left and the top right pixels is not black.
This should result in a vertically centered splash screen.

The bottom area of the png contains a logo.
I added all 4 images and they appear in deployment manager as well.
Setting for clamp/repeat mode is "disabled" and for gravity is "Bottom", "fill" or "center".
I tried all of those. Unfortunately access to Google's Android developer website is not
possible at the moment, it doesn't load.

In deployment manager "splash_image_def.xml" in "Android}Debug" is not checked,
I don't know why. I didn't do this and I also don't know if it needs to be checked.

Ok, rereading the help months anfter initially implementing the splash screen I saw that
one of the two methods to do it is actually to uncheck this file. So I must have done it in
the past.

I also checked now that on those two devices where it is wrong (LG L50 and
Samsung Galaxy XCover 3) the 470x320 sized image is being used.

Greetings

Markus
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Android splash screen issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 2, 2016 5:27 AM   in response to: Markus Humm in response to: Markus Humm
Hello,

it works in a new "splash screen only" project.
The project I'm working on uses Brian Long's NFC solution though which replaces
the standard activity used by FMX with some stub.

Has anybody any clue whether this affects it?

Greetings

Markus
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Android splash screen issue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 15, 2016 2:02 AM   in response to: Markus Humm in response to: Markus Humm
Is reported as bug and acknowledged as such
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02