fullscreenmode and rect of a substack on mobile device ?

Sannyasin Brahmanathaswami brahma at hindu.org
Thu Aug 30 10:16:02 EDT 2018


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?




More information about the use-livecode mailing list