Page 1 of 1

Stack size on Android

Posted: Thu Jun 04, 2015 12:59 pm
by Ashkan
I have written a program and saved it as standalone for Android.
When I install the apk file on Sony Xperia Z Device and read the stack height and width I get the following numbers:
360 * 592 which is much less than the device actual screen size i.e. 1080*1920!
Stack size seems 1/3 of the real resolution.
I did my best to find an answer. But I couldn't
I highly appreciate any comment solving my problem.

Re: Stack size on Android

Posted: Thu Jun 04, 2015 4:07 pm
by LCNeil
Hi Ashkan,

This will most likely be due to the pixel density of your device. LiveCode maps to the pixels scale of your device which, in your case, seems to be 3.

You can disable this automatic pixelscaling by executing the following script (e.g. on the preOpenstack script)-

Code: Select all

   set the pixelScale to 1 
Your stack should now map 1 to 1 with the pixels of your device.

Kind Regards,

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

Re: Stack size on Android

Posted: Thu Jun 04, 2015 4:17 pm
by MaxV
I would use:

Code: Select all

set the fullscreenmode of this stack to "exactfit"
and forget about the resolution. :mrgreen:

Re: Stack size on Android

Posted: Thu Jun 04, 2015 6:55 pm
by Ashkan
Thanks a lot. Both methods worked. They are not equal and behave differently.
I highly appreciate your contribution. Both of you.