Screenrect versus mobile phone pixel size

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Screenrect versus mobile phone pixel size

Post by newtronsols » Wed Oct 01, 2014 2:41 pm

When I test my Sony Xperia it says the screenrect is: 360 width x 592 height
But the specs say 720 x 1280 pixels. 319 ppi. The screenrect doesn't include the status bar.

What is the relationship? How is the screenrect value calculated for my phone? What is the rect of the status bar?

OK, my guess:

In my opinion the screen 'actual' size for my 720 x 1280 pixels in terms of LC is 360w x 640h which consists of the status bar 360w x 48h and the screenrect 360w x 592h.

screenrect ref:
http://livecode.com/developers/api/6.0. ... creenRect/

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Screenrect versus mobile phone pixel size

Post by LCNeil » Fri Oct 03, 2014 2:04 pm

Hi Newtronsols,

I've done a little bit of research regarding this and it would seem if you device has on screen navigation controls (e.g back, home), then these will reduce the screenRect like you're experiencing. The 720 x 1184 resolution is all well documented on other development sites in regards to having on screen navigation controls.

I was also able to to test this in house with our Motorola Xoom tablet which has a screen resolution of 1280 x 800. When I deployed my test application to this, the on screen navigation controls caused the screenRect to return 0,0,800,1232 which would imply 48 pixels for navigation. As the Xooms pixels scale is 1 and your device is likely 2, the 96 pixel difference would be the correct amount.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.runrev.com
--

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: Screenrect versus mobile phone pixel size

Post by newtronsols » Sat Oct 04, 2014 2:59 pm

thanks for the reply.

Post Reply

Return to “idea2app and Coding School”