fullscreenmode and rect of a substack on mobile device ?
Sannyasin Brahmanathaswami
brahma at hindu.org
Sat Aug 18 12:36:27 EDT 2018
I have a similar issue with a stack that
a) contains a browser that wants to fill the entire screen (of any device)
b) a tool bar on the bottom, the background ( 50 px wide) which to set to 2000 wide
c) a 4 widget that appear on bottom on top to background.
It should work on portrait and landscape
That's it, not a complicated screen to layout, responsive... or so we thought....
Going around and around with this on support, I was using "show all"
set at 414x736 (iPhone); and with Jacque's help to optimize my code
This left pillar boxes left and right (show the stack/card color) on my Android.
Using all the "new methods"
mobileSetFullScreenRectForOrientations "portrait,portrait upside down","0,0,414,736"
etc
We were unable to gain programmatic control to use screenrect to fit the device.
My Guess/I am wrong, HQ could let us know:
seems the fullscreenmode[what-Ever-It-Is] will, at an engine level will override any attempt to do the simple "responsive" handlers of
========
# snip the orientation changed handlers,
# but it all comes down to this:
put the screenrect into tRect
set rect to widget "browser" to \
(item 1 of the tRect, item 2 of the tRect, item 3 of tRect, item 4 of tRect-50)
========
Support said
use fullscreenmode "exactFit"
Jacque predicted it would fail, all kinds of distortion. I used tried it, worked on the Pixel. (ratio of the widget at bottom barely noticeable) I happily deployed to my "nightly" branch
When I finally dug out an iPad to test--oh horror, Jacque was right -- the widget and the bottom were all stretched out!
So, I was stuck, went on another project, but I too would like to
Ludovic THEBAULT wrote:
How get the « real » rect of the stack ?
is seems, if you want to do "responsive" design, that it will need to be done *without* using fullscreenmode, and do it by handling the screenrect yourself. Which defeats the purpose of fullScreenMode "help" for the developer.
@Andy I will try the effective Screenrect to see what we get.
BR
More information about the use-livecode
mailing list