Stack size on Android

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Ashkan
Posts: 7
Joined: Thu Jun 04, 2015 12:45 pm

Stack size on Android

Post by Ashkan » Thu Jun 04, 2015 12:59 pm

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.

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

Re: Stack size on Android

Post by LCNeil » Thu Jun 04, 2015 4:07 pm

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
-

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Stack size on Android

Post by MaxV » Thu Jun 04, 2015 4:17 pm

I would use:

Code: Select all

set the fullscreenmode of this stack to "exactfit"
and forget about the resolution. :mrgreen:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Ashkan
Posts: 7
Joined: Thu Jun 04, 2015 12:45 pm

Re: Stack size on Android

Post by Ashkan » Thu Jun 04, 2015 6:55 pm

Thanks a lot. Both methods worked. They are not equal and behave differently.
I highly appreciate your contribution. Both of you.

Post Reply