The Android screenrect
Posted: Tue May 05, 2020 2:27 pm
Is there a way to get the effective / working screen rect for Android devices.
Ive tried the screenrect, the working screenrect and the effective screenrect but all return the same result, the screen rect including the status and navigation bars.
I would like to know the actual area available for my app, the space between the two bars.
The reason is as follows. The livecode scaling options are brilliant, but the exactFit option (and others) are not perfect when you design for a ratio of 1.77 and then deploy on a 2/1 screen. It is simple enough, however, to resize the stack before setting the exactfit property, you get the benefit of the scaling on 95% of controls on the card and just have to reposition the bottom items or group that controls the scrolling element, there is no distortion this way.
The issue is I cannot seem to find out how to get the ratio after the menu bars have been taken into account. I don't want to hide the bars, I just want to resize the size of my stack to use the available space before setting the exactfit option to scale everything so circles stay as circles etc.
Using anything I've tried includes the whole screen, even if I've asked for the working screenrect.
Its just small things like this that are stopping me using Livecode for a full app.
Any ideas would be very welcome!
Ive tried the screenrect, the working screenrect and the effective screenrect but all return the same result, the screen rect including the status and navigation bars.
I would like to know the actual area available for my app, the space between the two bars.
The reason is as follows. The livecode scaling options are brilliant, but the exactFit option (and others) are not perfect when you design for a ratio of 1.77 and then deploy on a 2/1 screen. It is simple enough, however, to resize the stack before setting the exactfit property, you get the benefit of the scaling on 95% of controls on the card and just have to reposition the bottom items or group that controls the scrolling element, there is no distortion this way.
The issue is I cannot seem to find out how to get the ratio after the menu bars have been taken into account. I don't want to hide the bars, I just want to resize the size of my stack to use the available space before setting the exactfit option to scale everything so circles stay as circles etc.
Using anything I've tried includes the whole screen, even if I've asked for the working screenrect.
Its just small things like this that are stopping me using Livecode for a full app.
Any ideas would be very welcome!