fullscreenmode and rect of a substack on mobile device ?
J. Landman Gay
jacque at hyperactivesw.com
Fri Aug 24 23:43:04 EDT 2018
It's more complicated than that. Using the iPad Air simulator and this
preOpenCard handler:
on preopenstack
mobileSetAllowedOrientations("portrait")
iphoneUseDeviceResolution true,true
end preopenstack
When I press the "Get the rect" button it reports the stack, card, and
screenrect are all 0,0,640,960. Also, the right and bottom of the stack
are clipped and the controls are not centered, they're shifted right and
down.
If I comment out iphoneUseDeviceResolution so that only the orientation
is set, the stack is huge, runs off the right and bottom, and no fields
or buttons are shown because they are offscreen. I see only the topleft
corner of the stack. I don't know what it thinks the rects are because I
can't see the buttons.
If I hit the 1X button in the simulator, which doubles the resolution to
emulate retina, the card gets half as big, floats in the middle of the
screen, and still shows only the topleft corner of the stack (no buttons
or fields.)
If I change the handler to this:
on preopenstack
mobileSetAllowedOrientations("portrait")
set the fullscreenmode of stack "ipad" to "showall"
end preopenstack
The stack doesn't fill the screen and leaves blank, black edges at sides
and bottom. The content does not resize, showing the default card color
at the top and bottom of the card. The button reports:
Stack rect: 469,116,1237,1140
Card rect: 0,0,768,1024
Screenrect: 0,0,320,480
An iPad with a screenrect of 320x480? When I was trying to fix this with
a resizing handler similar to what you wrote, nothing I did would change
the stack rect. It stayed stuck at 640x960 with black, blank edges
around it.
On 8/24/18 4:38 PM, Brian Milby via use-livecode wrote:
> Hmmmm
> So it reports that the stack and screen are 768/1024 yet does not fill the screen? That is very odd. For me it did fill the screen until I changed it to be short on purpose.
>
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list