fullscreenmode and rect of a substack on mobile device ?
Brian Milby
brian at milby7.com
Thu Aug 30 14:36:19 EDT 2018
In the above code, I don't see a "local sRect" declaration which would need
to be outside the handlers to work as intended.
What about just hard coding the rect as a test? If you can set the stack
rect to what you know the screen to be that way, then we can proceed to
figure out why that value isn't getting there properly. If setting the
rect manually doesn't work, then there is an issue that is deeper than just
knowing what the rect needs to be.
>From earlier in the thread it appears that on Android, the first
"resizestack" is not getting sent. You don't get one until you rotate the
device. What I'm not clear about is whether you can set the rect of the
stack to the known screen rect and have it display correctly.
I don't think Ludovic's code will help this particular issue since you are
having a problem getting the screen rect. If you have the screen rect, you
shouldn't need to do anything with the scale. You are doing everything
with logical pixels.
On Thu, Aug 30, 2018 at 10:36 AM Ralph DiMola via use-livecode <
use-livecode at lists.runrev.com> wrote:
> I don't use a sub-stack to move from the splash to the main GUI stack. My
> stub-stack (after using my hack to display the splash card correctly) does
> 1: load all library stacks, sets all behaviors/back scripts,... 2: a send
> in
> 10 ticks to a handler that opens the GUI stack. After that there is no
> issues with getting the correct card rect. The splash stack sits invisible
> in the background and houses the engine and any inclusions/extensions... Of
> course in the IDE the splash stack remains open and visible, but who cares?
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
>
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
> Behalf
> Of Sannyasin Brahmanathaswami via use-livecode
> Sent: Thursday, August 30, 2018 10:16 AM
> To: How to use LiveCode
> Cc: Sannyasin Brahmanathaswami
> Subject: Re: fullscreenmode and rect of a substack on mobile device ?
>
> Ha! One has to thank our community for "never giving up!" That spirit
> alone
> is worth it weight in gold -- the Indy License!
>
> @ Brain "Gee, why didn't I think of that!"
>
> Not calling as substack; I use this as navigation between mainstack (the
> splash screen and that has the stack files is always open but hidden)
>
>
> command portal_GoStack cardOrStackObject
>
> # save where we are coming from locally
>
> put the short name of this stack into oStackName
>
> [snip]
>
> # Attempt to fix Android by dealing with mobile controls
>
> # and Accelereated Rendering from here
>
> # We deal with the each stack case
>
> if oStackName <> empty then
>
> # this is not the first run boot of portal
>
> deleteAllMobileControls # will destroy all except audioPlayer
>
> end if
>
> --> Variations on stack transition methods.
> --> timing is important, else android crashes
>
> set the acceleratedRendering of stack oStackName to false
>
> go cardOrStackObject
>
> # e.g go "gems" (or this string) go card 3 of "gems"
>
> wait 20 milliseconds with messages
>
> close stack oStackName
>
> wait 20 milliseconds with messages
>
> ## this does not work! -->
>
> ## go to cardOrStackObject in window oStackName
>
> end portal_GoStack
>
> So, since the whole app is running I could get the screenrect when the
> "portal" (index, TOC of the whole app) loads. And save to a local in main
> lib_SIvaSiva.livecodescript (always open)
>
> but still, I don't think screenRect will register in LC RAM *without*
> running "resizestack" so how would I force that?
>
> (thinking out loud) just running a handler to check may suffice to get the
> coords of the phone.
>
> local sMobileRect
> ...
> send "mobileRectSet" to me in 1 second
> end portal_GoStack
>
> command mobileRectSet
> put the screenRect into sMobileRect
> end mobileRectSet
>
> function mobileRectGet
> return sMobileRect
> end mobileRectGet
>
> I will try it
>
> @ Ralph
>
> Wow! That is quite a hack. I may try it. If the above does not work.
>
> BR
>
>
> On 8/29/18 10:09 AM, Brian Milby via use-livecode wrote:
>
> Aren't you calling this as a sub-stack? If so, could you capture the
> screen
> rect before the switch and pass in the data or cache to the file system and
> read it in?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list