Emulator screen dimensions off

ukimiku

Active Member
Licensed User
Longtime User
Hi all,

I am trying to write my second B4A app (the first, of course, being Hello, World!). I would like to match the emulator my physical device, an Xperia S. It has screen dimensions of 720 x 1280 pixels and a pixel density of 342 pixels per inch (a screen of 4.7 inches). No matter with which values I set up the Designer and the emulator, I cannot get it to display the width and height of my physical device correctly (720 x 1280 pixels, I would accept scaled as well, but that too seems impossible).

What values do I have to supply where to make this happen? Can it be done?

Thank you for your patience with a complete newbie.

Regards,
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The easiest way is to connect the designer to the device and see the values in the designer:
SS-2012-06-28_09.53.25.png


I do not recommend you to create a variant for this device as the normalized values are similar to a standard phone variant.

See the link in my signature for more information.
 
Upvote 0

ukimiku

Active Member
Licensed User
Longtime User
Thanks, Erel,

for the advice. I can in fact see my device details in the Designer. Why does it show a scale factor of 2? I don't want to have my images scaled (this results in a loss of quality from the image transformation), I would like to have them 1:1, just as designed. The scale transformation that seems to be applied reduces the actual resolution by a factor of 2. Is this interpretation correct?

Also, can the Designer be made to recognize and display the correct pixel density? It is indeed not 320 dpi as claimed by the Designer but 342 dpi, which does make some difference in terms of relative appearance.

Thank you for advising me not to create a variant for this device. But since I am making a small demonstration program that is intended only for this particular device, I will anyhow, as I am just learning the basics of B4A and would like to get more confident with the Designer.

Again, thanks!

Regards,
 
Upvote 0

ukimiku

Active Member
Licensed User
Longtime User
Thanks again, all is cleared up now. And working :)
Regards,
 
Upvote 0
Top