Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Firemonkey form width vs Physical phone screen width ?


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


Permlink Replies: 1 - Last Post: Sep 9, 2017 9:40 AM Last Post By: GAI CHEW KAI
GAI CHEW KAI

Posts: 53
Registered: 7/29/04
Firemonkey form width vs Physical phone screen width ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 9, 2017 9:12 AM
Embarcadero® C++Builder 10.2 Version 25.0.26309.314
Android 7.0.1
Microsoft Windows 10 x64 Pro [Version 10.0.14393]

I noticed the IDE only with Android 5" Phone but my Android phone is 5.5", therefore the form width from design page is not matching when deployed to physical phone.

Is there any solution to retrieve the actual phone screen size, for example the 5" Android phone from IDE, the width is 450 under client alignment.
However, under my phone via manually increasing the rectangle width, the result is 360 instead of 450. Thus, I cannot position the video horizontal correctly.

This is important as the phone width varies from different models, I needs to know how to get the actual screen size such as 360x640 dp for 5.5" Asus Zenfone 3.
Although this Asus phone claimed to support 1080x1920 resolution but under Embarcadero C++Builder form based, the size is different.

https://material.io/devices/ as references.

Please advise.

GAI CHEW KAI

Posts: 53
Registered: 7/29/04
Re: Firemonkey form width vs Physical phone screen width ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 9, 2017 9:40 AM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
found the answer:

int w;

w = TScreen::DesktopWidth;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02